1 Replies Last post: Jul 22, 2009 6:12 AM by ManojK  
Shambhu Kumar Beginner 5 posts since
Jun 26, 2009
Currently Being Moderated

Jul 7, 2009 9:16 AM

problem with verifying wrong password in firefox

Hi All,

 

               I am having problem with verifying wrong password. I am testing one webpage with wrong password. After entering the wrong password, i am verifying for the text present "Invalid Username / Password!", and again when i am entering the wrong password, since the web page is not reloading, it is simply showing the same page within a fraction of second. And due to that, when i am entering the correct password third time, it's not happening. But the same thing is working fine with IE, may be because IE is slow. Here is the part of code:

 

test_modules->login_logout(\$sel, "admin", "admin");

$sel->wait_for_text_present_ok("Invalid",30000);

$sel->is_text_present_ok("Invalid Username / Password!");

 

test_modules->login_logout(\$sel, "ADMIN", "PASSWORD");

$sel->wait_for_text_present_ok("Invalid",30000);

$sel->is_text_present_ok("Invalid Username / Password!");

 

test_modules->login_logout(\$sel, "admin", "password");

 

even after entering the correct password third time, my web page stays on "Invalid Username/ Password!" page only and rest of test cases are failing.

 

login_logout function enters the user id and password and click on login button.

 

How can i put a put a wait for few seconds after clicking on login button.

 

Regards,

Shambhu.

ManojK Expert 213 posts since
Apr 4, 2008
Currently Being Moderated
1. Jul 22, 2009 6:12 AM in response to: Shambhu Kumar
Re: problem with verifying wrong password in firefox

hi,

 

Yes ur right. There is a synchronization problem arising alot in selenium on different browser. So, for that you to use wait command to various places.

 

Bye

More Like This

  • Retrieving data ...