Really Quick Start

You can also use Selenium IDE to create and edit tests:

Overview and Usage Notes

ERSelenium provides several features for effective use of SeleniumCore with WebObjects applications including:

Using ERSelenium

You can use ERSelenium directly from workspace:

  1. Specify it as your project's workspace dependency .
  2. Enable it in the project's Properties file:
    SeleniumTestsEnabled=true
    

    Debug output of ERSelenium can be enabled in Properties by:
    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
{panel}
  ./Selenium
    ./registration
      ./successful.sel
      ./alreadyexists.sel
    ./shop
      ./buyitem.html
      ./notenoughmoney.html
      ./transfer.sel
{panel}

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

Example: http://127.0.0.1/cgi-bin/WebObjects/SampleProject.woa/-42421/wa/SeleniumStartTesting

To run a specific group of tests, add "/TestGroupName":

http://[baseurl]/wa/SeleniumStartTesting/TestGroupName
http://127.0.0.1/cgi-bin/WebObjects/SampleProject.woa/-42421/wa/SeleniumStartTesting/registration

Some tips for writing tests for ERSelenium

Category:WebObjects