Wiki
Clone wikiScripted Selenium / Home
Overview
Scripted Selenium is FOSS for web application developers who want to automate web application validation and screencasting for simple web sites. When running, the mouse cursor moves using an easing function. Watch the example video.
See the Commands page for a list of current script commands; see the issue tracker for a list of planned commands.
Getting Started
To use this software:
- Install Java.
- Visit the overview page.
- Click the download link.
- Unzip the
.zip
file. - Rename the directory to
scripted-selenium
. - Open a command prompt.
- Change to the scripted-selenium directory.
How to proceed from here depends on the operating system.
Windows
On Windows, run Scripted Selenium as follows:
cd path\to\scripted-selenium java -cp classes;lib\* com.recipefiddle.testing.ScriptHarness scripts\ddg.xml
Linux
On Linux, run Scripted Selenium as follows:
#!bash cd path/to/scripted-selenium ./run.sh scripts/ddg.xml
Example Script
Scripts are saved in external XML files, such as:
#!xml <script> <comment>Paste this script.</comment> <visit>http://pastie.org/</visit> <text id="paste_body" delay="500">let ∞ = μ(x) => μ(x)</text> <pause delay="3500" /> <comment>Select the script syntax.</comment> <option id="paste_parser_id" text="HTML / XML" delay="1000" /> <click css="input[type='submit']" /> <pause delay="5000" /> <visit>http://duckduckgo.com/</visit> <text id="search_form_input_homepage" delay="500">Joshua Stein site:lobste.rs</text> <click id="search_button_homepage" /> <click link="Lobsters" delay="1000" /> <click link="joshua stein" /> <click css="span.d:nth-child(16) > a:nth-child(1)" /> <pause delay="2500" /> <visit>https://jcs.org/</visit> <pause delay="2500" /> <click css="a[title='bmw spaceship']" delay="1000" /> <pause delay="5000" /> </script>
Running
The example is located in the scripts
directory and can be run as follows:
./run.sh scripts/lobsters.xml
By default the script is run using Chrome, but can be run using Firefox as follows:
./run.sh scripts/lobsters.xml firefox
Updated