Last modified by Pascal Robert on 2012/07/19 21:10

Hide last authors
Ravi Mendis 38.1 1 = How to test a Diva app with Selenium =
2
3 In a 100% ajax world it becomes more than necessary to maintain a set of tests for your application.
Pascal Robert 40.1 4 Here's how to get started with Selenium testing a Diva app.
Ravi Mendis 38.1 5
6 === Setup ===
7
Pascal Robert 40.1 8 1. Add the WebObjects {{code language="none"}}ERSelenium{{/code}} framework to your project build path Libraries.
9 1. Create the folder {{code language="none"}}Selenium{{/code}} in the project {{code language="none"}}Resources{{/code}} directory.
Ravi Mendis 38.1 10 1. Place your Selenium tests in this folder
Pascal Robert 44.1 11 1. Enable the [[ERSelenium>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]] test-runner by adding {{code language="none"}}SeleniumTestsEnabled=true{{/code}} to the command-line arguments of the app (or to the {{code language="none"}}Properties{{/code}} file).
Ravi Mendis 38.1 12
Pascal Robert 44.1 13 You will find an in depth explanation of creating Selenium tests for WebObjects [[here>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]].
Ravi Mendis 38.1 14
15 {{info title="Note"}}
Ravi Mendis 42.1 16 The semantically rich markup of [[ERDivaLook>>doc:documentation.Home.Frameworks.ERDivaLook.WebHome]] makes it **easy** to write **maintainable** Selenium tests
Ravi Mendis 38.1 17 {{/info}}
18
19 === Running Selenium Tests ===
20
Pascal Robert 40.1 21 Launch your application in development mode (i.e with {{code language="none"}}er.extensions.ERXApplication.developmentMode=true{{/code}}).
22 Then click on //Run Test// link in your page menu:
Ravi Mendis 38.1 23
Pascal Robert 40.1 24 [[image:attach:RunTests.png]]
Ravi Mendis 38.1 25
Pascal Robert 44.1 26 Next you will see the [[ERSelenium>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]] test runner:
Ravi Mendis 38.1 27
Pascal Robert 40.1 28 [[image:attach:TestRunner.png]]
Ravi Mendis 38.1 29
30 You may run the entire suite of Selenium tests or run them individually by clicking on the buttons marked by the oval.
31
Pascal Robert 40.1 32 See also: [[doc:WO.Selenium]]