SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium IDE "waitForChecked" and "waitForNotChecked" Commands With Examples

Check box is very essential element of any software web application page and you will find it on many pages so obviously we need to include it in our automation process. Selenium IDE has few commands which are specially developed for checkbox. In my earlier posts, we had seen many check box related commands like
"check", "storeChecked", "uncheck" and MANY MORE. Other 2 check box related commands are "waitForChecked" and "waitForNotChecked". Let me describe you both with proper examples.

"waitForChecked" Command
"waitForChecked" command is useful to wait till targeted check box change its status from unchecked to checked. You will find this kind of scenario sometimes. Maximum wait time will be default timeout of your selenium IDE.

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.in/2014/01/textbox.html
waitForChecked//input[@id='check2']
echoCheckbox is checked now.. Please perform your next action
pause2000
check//input[@id='check3']


"waitForNotChecked" Command
Same as "waitForChecked" command, "waitForNotChecked" command will wait till targeted check box change its status from checked to unchecked. Run above and bellow given examples in your selenium IDE window and observer result

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.in/2014/01/textbox.html
waitForNotChecked//input[@id='check1']
echoCheckbox is UnChecked now.. Please perform your next action
pause2000
check//input[@id='check3']

No comments:

Post a Comment