Selenium

Site

Selenium

The website may be a little complicated at first sight.
What you need:
- to record and playback scripts: Selenium IDE. This is a FireFox-plugin which allows you to records test scripts for Selenium and to execute them later.
- to automize running the scripts: Selenium WebDriver (Selenium Client Drivers on the download page). This is a collection of language and browser specific bindings to execute Selenium test scripts.

Selenium IDE

Difference between assertValue and verifyValue
assertValue will stop the test if it fails, verifyValue will go on.

Execute Javascript
Use storeEval. The target contains the Javascript.
The result of the last line will be passed to the variable in the Value.
eg. var label = window.document.getElementById("elementID").innerHTML; label.substring(14, label.indexOf("-"));
So the label.substring will be put in the variable.
You can use the variable like ${variablename}.

Getting a value in a table
assertText //table[@id='tableID']/tbody/tr[row]/td[column]
The first row is 1, the first column is 1.
If the first row is a header, it can not be used, so the first real row is 2.

Checking a selected value in a dropdownlist
assertSelectedLabel

Checking a checkbox
assertChecked

Selenium IDE Plugins

Selenium IDE can be extended through its own plugin system.
You can find them on the Selenium download page
http://docs.seleniumhq.org/download/

Selenium IDE User Extensions

User extensions are JavaScript files that allow one to create his or her own customizations and features to add additional functionality. Often this is in the form of customized commands although this extensibility is not limited to additional commands.

More information: See the manual 'User extensions'

Download extensions

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License