- Selenium IDE Firefox plugin and XPath Checker can be very handy for creating and editing Selenium tests. Selenium IDE Selenese source plugin with proper comments support resides in ERSelenium/Resources/selenese-ide-plugin.js.
Using basic flow control
flowControl is a user-contributed extension that provides some basic flow control.
- Append the contents of that file to
~/Library/Frameworks/ERSelenium.framework/WebServerResources/selenium-core/scripts/user-extensions.js(or wherever you have
- Use the commands as described in the flowControl documentation.
For example, consider a test page that displays an integer counter (in the format "Counter = n", where n is the current value of the counter), and has an "Increment" button with
id="increment". The following Selenese fragment would repeatedly press the button until the counter reached 10:
|while|!selenium.isTextPresent("Counter = 10");|| |click|increment|| |endWhile|||
ERSelenium offers tests' developers several nice features - like automatic test suite generation, metacommands and URL independence. Unfortunately this leads to some troubles when trying to execute your tests with Selenium-RC. This is where StandaloneRunner can be very helpful.