SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium IDE "waitForVisible" and "waitForNotVisible" Commands

Setting wait condition in Selenium IDE or webdriver means pausing your test case execution till expected wait condition match with actual wait condition. You can view different wait condition examples for selenium IDE in THIS LINK and for web driver on THIS LINK. Selenium IDE has 2 related waiting commands to
wait till element's visibility or invisibility from the page. Those commands are "waitForVisible" and "waitForNotVisible" Commands. As you know, element's edit ability is different then element's visibility so don't be confused in these two terms.

"waitForVisible" Command
This command will wait till element visible on the page. Once command will visible on page, selenium IDE will go for executing next command.

"waitForNotVisible" Command
Same way, "waitForNotVisible" command will wait for invisibility of the element from page. Run bellow given example in your selenium IDE and watch what happens.

New Test
CommandTargetValue
setSpeed2000
openhttp://only-testing-blog.blogspot.in/2014/01/textbox.html
waitForVisible//input[@id='text3']
type//input[@id='text3']Hidden Text box is visible now
refreshAndWait

waitForNotVisible//input[4]
type//input[@id='text3']To Hide text box is not visible now

"refreshAndWait" command will refresh the page and wait till page loaded completely. You can view complete list of selenium IDE commands with example on THIS PAGE and if you are webDriver learner then THIS WEBDRIVER TUTORIAL will helps you to learn it quickly.

No comments:

Post a Comment