A simple scripting language for driving selenium based web automation and regression testing.
Script Driver is a simple yet powerful scripting language for Selenium, designed to take some of the pain out of writing and updating automation and regression tests for web pages. Selenium is a powerful automation tool for web pages, but it requires a fair amount of code to do even the simplest things. The idea behind Script Driver is to hide all the complication inside the script engine, and expose the power of selenium through the simplest of scripting commands. Simple and quick was the goal behind this project.
The current state of this project is, that I developed it enough for me to be able to provide a reliable set of regression tests for the html5 application I am developing. It is by no means a complete scripting language for selenium, as it does not support all of the features selenium supports, and only supports ChromeDriver at present. It was also developed incrememntally and new features were added quickly and so there was no original design, and no design approval process for enhancements.
ScriptDriver continues to be the main testing environment for the HTML5 application we maintain and has been ever since it was first released.
If you're looking for something simple, yet quite powerful, to get you going in web automation / regression testing, you should give ScriptDriver a go.
Version 0.5.2
is now available.
- Update selenium to 3.141
Version 0.5.1
is now available.
Enh
: Fix issue with enabled, selected and displayed checks not working properly.
Version 0.5.0
is now available.
Enh
: Upgrade to selenium server 3.11.0 and chromedriver to 2.37
Version 0.4.0
is now available.
Enh
: Upgrade to selenium server 3.3.1
Version 0.3.3
is now available.
Fix
: Issue #19: Changeinfo
output to outputdisplayed
check beforeat
andsize
checks.
Version 0.3.2
is now available.
Enh
: Add browser control verbsrefresh
,back
andforward
Fix
: CRCchecksum
of non-input elements (like div).
Version 0.3.1
includes a couple of fixes and a special version of the click
command.
Fix
: Don't try and wait for -tve periodsFix
: browser wait can now be a alias argumentEnh
: Added click-now command, performs a click without waiting. Useful in some circumstances when elements are quickly changing.
Version 0.3
includes screen shot support, and changes the way elements and
click timeouts work, now using webdriver built in functionality.
Enh
: screen shot supportEnh
: use WebDriverWait for clicksEnh
: browser wait set default driver wait (for finding elements)Enh
: wait clickable (wait for something to be clickable)
Version 0.2
contains some enhancements and new features and bug fixes as well
as some refactoring that went on under the hood:
Enh
: Improved wait support including an auto wait featureNew
: push/pop waitNew
: Alias parameters (aka functions)Fix
: sleep fractions (sleep 0.1)
Previous updates to 0.1
included:
New
: browser chromeNew
: Checksum supportNew
: log auto onEnh
: abort test on javascript errorsNew
: scroll-into-viewEnh
: Wildcard support for at and size
As far as to what our plans are for this project, it is
- to continue to extend the current language as needed (ongoing)
- add support for browsers other than chrome
- possibly re-factor some of the syntax (extending it on an ongoing basis)
- maybe even re-implement the language in something other than java (nodejs perhaps).
The test script files themselves are platform independent. The engine is written in java so should run cross platform, though I have only tested it on OS X and Windows.
We have decided to release this project as open source so that others can maybe benefit from it, and maybe improve on what we have done so far.
browser start
browser get "https://github.com/"
wait 30
select "#js-command-bar-field" send "ScriptDriver"
select ".choice:first-child" click
sleep 30
See Engine/lib/INSTALL.txt for instructions on how to download selenium and chromedriver.
To build this project requires eclipse IDE. Proceed as follows.
- Open this the Engine folder as a Workspace.
- Go to work bench
- File, Import ... and choose General -> Existing projects into workspace
- Specify the Engine folder as the root. Eclipse will find TestEngine project.
- Click finish to add.
- Right click build.xml and select Run As -> Ant Build
Sorry the instructions are a bit sparse, not yet fully figured out what exactly from eclipse needs to go in source control for it to remember all the project settings.
A pre-built version of the current release is available here:
0.5.1
|
0.5.0
|
0.4.0
|
0.3.3
|
0.3.2
|
0.3.1
|
0.3
|
0.2
|
0.1
The archive is for Windows and OSX. Linux users will need to download the correct version of chromedriver.
Extract the archive to a folder. Navigate to the folder at a command prompt (windows) or shell (OSX/Linux).
For windows, edit run.cmd and alter the JAVA variable to point at your java install.
Run the sample script provided as follows:-
OSX/Linux:
./run.sh examples/github-search.test
Windows:
run.cmd examples/github-search.test
https://github.com/redskyit/ScriptDriver/wiki/Language-Syntax-(v0.3) https://github.com/redskyit/ScriptDriver/wiki/Language-Syntax-(v0.2)