- ArchanaRegular Participant
- Posts : 33
Join date : 2009-08-21
File type validation
Wed Aug 26, 2009 9:28 pm
Hi,
I have set “signed.applets.codebase_principal_support” set to the value “true” in my Mozilla.
In my selenium IDE, the below testcase (HTML format) is running fine.
type | trophy_image | C:\Documents and Settings\Administrator\Desktop\1.txt
click | submit
waitForAlert | Invalid Image file
But, Equivalent PHP-sel RC testcase is giving exception when I run in iexplore (In mozilla, its fine)
$this->type("trophy_image", "C:\\Documents and Settings\\Administrator\\Desktop\\1.txt");
$this->click("submit");
for ($second = 0; ; $second++) {
if ($second >= 60) $this->fail("timeout");
try {
if ("Invalid image file"== $this->getAlert()) break;
} catch (Exception $e) {}
sleep(1);
}
is giving timeout.
What's the problem here? I think as it is security issue, IE is not allowing to type in to text field. How to solve this issue?
I have set “signed.applets.codebase_principal_support” set to the value “true” in my Mozilla.
In my selenium IDE, the below testcase (HTML format) is running fine.
type | trophy_image | C:\Documents and Settings\Administrator\Desktop\1.txt
click | submit
waitForAlert | Invalid Image file
But, Equivalent PHP-sel RC testcase is giving exception when I run in iexplore (In mozilla, its fine)
$this->type("trophy_image", "C:\\Documents and Settings\\Administrator\\Desktop\\1.txt");
$this->click("submit");
for ($second = 0; ; $second++) {
if ($second >= 60) $this->fail("timeout");
try {
if ("Invalid image file"== $this->getAlert()) break;
} catch (Exception $e) {}
sleep(1);
}
is giving
What's the problem here? I think as it is security issue, IE is not allowing to type in to text field. How to solve this issue?
- ArchanaRegular Participant
- Posts : 33
Join date : 2009-08-21
Re: File type validation
Mon Aug 31, 2009 8:03 pm
Pls do reply any one! Thanks in advance.
- ArchanaRegular Participant
- Posts : 33
Join date : 2009-08-21
Re: File type validation
Fri Sep 11, 2009 7:02 pm
Hi, Any ideas to solve my problem?
- nellorekrishnakumarActive particpant
- Posts : 19
Join date : 2009-08-14
Age : 38
Location : HYDERABAD
Re: File type validation
Sat Sep 12, 2009 12:49 pm
Hi Archana,
Selenium performance in IE is slow when compared to firefox , try to put wait command and try to execute ur script in selenium.
Thanks,
Nellore Krishna Kumar
Selenium performance in IE is slow when compared to firefox , try to put wait command and try to execute ur script in selenium.
Thanks,
Nellore Krishna Kumar
- mugenhere
- Posts : 9
Join date : 2009-09-08
Re: File type validation
Mon Sep 14, 2009 2:01 am
Did you try printing $this->getAlert()? Try that inside the loop to see what is being compared with what.
The value you are comparing it with might differ slightly or maybe the value is not being fetched from the page.
Some code suggestions: 1)It seems you need a do-while/while loop
2) ($this->getAlert() == "Invalid image file") is more readable than (Invalid image file"== $this->getAlert())
The value you are comparing it with might differ slightly or maybe the value is not being fetched from the page.
Some code suggestions: 1)It seems you need a do-while/while loop
2) ($this->getAlert() == "Invalid image file") is more readable than (Invalid image file"== $this->getAlert())
- Trying to read from excel file with JUnit but get error message "The constructor SpreadsheetData(InputStream) refers to the missing type InvalidFormatException"
- Help : Upload file thru Window File Browser
- Selenium RC with NUnit throwing error - File does not exist. File 'c:\Projects\WebDriver\trunk\src\Selenium.Core\HttpCommandProcessor.cs'
- Captcha Validation
- how to do email validation using selenium?
Permissions in this forum:
You cannot reply to topics in this forum