开发者

Selenium IDE - Verifying hidden/visible verification messages?

There's a webpage I'm trying to test that has multiple textboxes. Each textbox has its own specific validation message that is hidden.

Before an incorrect value is entered, I am use 'verifyNotVisible' in or开发者_JAVA技巧der to confirm that there is no validation message being shown to the user. This part passes just fine.

Afterwards, I have selenium type in invalid characters to make the validation message show.

The problem I'm having at this point is that while the validation message is visible to me, Selenium is still failing at the 'verifyVisible' line right after entering the invalid characters.

The following is what I have in Selenium:

Selenium IDE - Verifying hidden/visible verification messages?

Full Image: http://i.stack.imgur.com/W5RrH.png

Note that the validation messages are set to hidden prior to having invalid characters entered. Additionally, both 'assertValue' and 'verifyTextPresent' are passing before and after the validation message is being shown.

Does anyone know of a way to have Selenium pass the 'verifyVisible' portion correctly?


You may need to insert an appropriate wait period. If you are checking verifyVisible immediately after inserting your invalid character the modified DOM might not yet be there at the point your comparison is being made.

Take a look, for example, at Selenium's clickAndWait to see how to wrap an appropriate pause.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜