Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

File type validation Empty 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?
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

File type validation Empty Re: File type validation

Mon Aug 31, 2009 8:03 pm
Pls do reply any one! Thanks in advance.
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

File type validation Empty Re: File type validation

Fri Sep 11, 2009 7:02 pm
Hi, Any ideas to solve my problem? Sad
avatar
nellorekrishnakumar
Active particpant
Active particpant
Posts : 19
Join date : 2009-08-14
Age : 38
Location : HYDERABAD

File type validation Empty 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
avatar
mugenhere
Posts : 9
Join date : 2009-09-08

File type validation Empty 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())
Sponsored content

File type validation Empty Re: File type validation

Back to top
Permissions in this forum:
You cannot reply to topics in this forum