selenium-implicit-wait


Selenium-IDE plugin incuding implicit wait functions

This plugin allows Selenium IDE to automatically wait until the element is found before executing each command using a locator.
It is designed to :

  • Avoid the user to add waitForElementPresent before click, type, select...
  • Implement the implicit wait function available with Selenium 2 WebDrivers
  • Handle Ajax synchronisation issues

An hourglass button is added to SeleniumIDE to enable/disable the implicitWaitLocator function and also provides 2 new script commands.
The first one is setImplicitWait which has the same purpose as the hourglass button and the second one is setImplicitWaitCondition which set a JavaScript condition that need to be true to execute each command.

An error is raised when an element is not found once the timeout is reached.

Release status
  • Beta. Feel free to report defects or wanted feature : http://code.google.com/p/selenium-implicit-wait/issues/list
Minimum Requirements
  • Firefox 8
  • Selenium IDE 1.1.0 http://seleniumhq.org/download/
How to use in SeleniumIDE ?
  • Download and install the plugin with Firefox (Download link is on the left)
  • Restart Firefox
  • Launch Selenium IDE
  • Open or record a script
  • Click on the hourglass button to activate the implicit wait function
  • Run the script and enjoy!
Screen Capture
New Selenium commands
  • setImplicitWait | timeout
Waits until a locator is found before executing the next command.
Ex: setImplicitWait | 5000
  • setImplicitWaitCondition | timeout | condition_js
Waits until the condition is true before executing the next command.
Examples using Ajax libraries to wait the end of a transaction :
 setImplicitWaitCondition | 5000 | !window.dojo || !window.dojo.io.XMLHTTPTransport.inFlight.length

setImplicitWaitCondition | 5000 | !window.Ajax || !window.Ajax.activeRequestCount
setImplicitWaitCondition | 5000 | !window.tapestry || !window.tapestry.isServingRequests()
setImplicitWaitCondition | 5000 | !window.jQuery || !window.jQuery.active
setImplicitWaitCondition | 5000 | !window.Sys || !window.Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()
setImplicitWaitCondition | 5000 | !window.goog || !window.goog.net || !window.goog.net.XhrIo || !window.goog.net.XhrIo.sendInstances_.length
Release note
  • 1.0.13 - Full code refactoring
  • 1.0.10 - Added user-extensions for Selenium Server, separated locator and condition timeout
  • 1.0.8 - Added setImplicitWaitLocator and setImplicitWaitCondition functions
  • 1.0.7 - first release
Author

Florent BREHERET

Project Information

The project was created on Jan 2, 2012.

Labels:
selenium implicit wait plugin ajax