- Open Eclipse from the menu choose File, New, Project...
- In the folder Java, choose Java Project.
- Give project a name, accept the rest of the defaults, and click Next.
- Download the latest zip file for selenium frm : http://seleniumhq.org/download/
- The latest version right now is : "selenium-java-2.15.0.zip"
- Unzip the files into the project that you just created
- Back in Eclipse, right click on your project in the Package Explorer and choose Build Path, Configure Build Path.... Choose the Libraries tab
- Click Add Jars
- Select all of the jars that you just unzipped into the /lib/selenium-jars/ folder and click OK
- Choose the primary selenium jar, which in this example is selenium-java-2.15.jar , expand and double-click on Javadoc location. (Enter the location for the Selenium JavaDocs into the Javadoc location path field htttp://selenium.googlecode.com/svn/trunk/docs/api/java/)
- Click Ok and u are ready.
- Right click on the /src folder in your project and choose New, Package...Give the package a name and click Finish.
- Right click on the package and choose New, Class...Give the class a name and accept the other defaults, but make sure that public static void main(String[] args) is checked.
- Add code from selenium IDE in JUnit4 (WebDriver) format
- Run the test :)
Thursday, December 29, 2011
Selenium 2.0 / Web Driver and Eclipse
Labels:
Other OpenSource Tools,
Selenium,
Testing Tips
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment