Child pages
  • ERSelenium Framework

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added sub-section on using some basic flow control.

...

  • 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.

  1. Download the flowControl JavaScript source.
  2. Append the contents of that file to ~/Library/Frameworks/ERSelenium.framework/WebServerResources/selenium-core/scripts/user-extensions.js (or wherever you have ERSelenium.framework installed).
  3. 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:

Code Block

|while|!selenium.isTextPresent("Counter = 10");||
|click|increment||
|endWhile|||

Standalone runner

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.

...