You can also use Selenium IDE to create and edit tests:
ERSelenium provides several features for effective use of SeleniumCore with WebObjects applications including:
You can use ERSelenium directly from workspace:
log4j.logger.er.selenium = DEBUG
Other ERSelenium properties:
In your SeleniumTestsRoot folder (Resources/Selenium by default) you should create tests hierarchy. Tests are divided into groups, each group is located in its own folder. In each folder there should be a collection of test files, each in one of the formats, supported by ERSelenium. Example hierarchy:
./Resources ./Selenium ./registration ./successful.sel ./alreadyexists.sel ./shop ./buyitem.html ./notenoughmoney.html ./transfer.sel
You can use both standard HTML and wiki-like Selenese formats for writing tests although Selenese format is usually a preferred choice.
To run all tests point your browser to SeleniumStartTesting Direct Action: http://baseurl/wa/SeleniumStartTesting
To run a specific group of tests, add "/TestGroupName":
|open|/| @repeat ...some actions... @values __selenium_test@ @__sel notcorrect@@ |type|xpath=id('content')/input|__selenium_test@incorrectdomain| ...some actions... @done
Note: in Selenese format, lines that don't begin with "|" are treated as comments, so metacommands in the example above will be safely processed by Selenium IDE.