Ronald Salas
Ronald Salas

Reputation: 21

verifytext in Selenium IDE script failing in IE even when it should be passing

Got a Selenium IDE script recorded and being played back using Selenium Server in -htmlSuite mode.It is supposed to put the type the User Name, Password and Domain then click Login. After logging in, at one corner, it should show UserName @ Domain. I have a verifyText for this. When I ran the script in Firefox, it is working correctly, but in IE, it keeps failing - giving me an error message Actual value 'UserName @ Domain' did not match 'UserName @ Domain'. I tried also assert and same thing. Is this a bug in Selenium or something?

Upvotes: 1

Views: 1031

Answers (1)

Petr Janeček
Petr Janeček

Reputation: 38424

You should try using waitForText, waitForElementPresent or waitForTextPresent commands, depending on your specific need.

The reason being that usually, when any text is created by a script on/after the page load, Selenium doesn't know about it - it can't possibly wait for every script to finish, because there's a lot of scripts that never finish and run forever. Therefore, you need to wait for your specific elements to appear before you can assert them.

Upvotes: 1

Related Questions