Setting Up Eclipse IDE With Selenium WebDriver and TestNG
July 27, 2016
Update: This post is outdated and has been archived.
- Install the latest version of the Java JDK
- Download the WebDriver JAR files for your preferred programming language and expand it into a folder for loading later into Eclipse
- Download and install the latest release of Eclipse IDE for Java Developers
- In Eclipse, open File > New > Java Project
- Enter a name for the project e.g. Selenium
- Click ‘Next’
- Click the ‘Libraries’ tab
- Click ‘Add External JARs’
- Add all the JARs from the Selenium WebDriver JAR folder (2 files) and the ‘libs’ subdirectory (~20 files)
- Click ‘Finish’
- Install the TestNG plug-in for Eclipse IDE
- In Eclipse, click on ‘Help’ > ‘Install New Software’
- Enter the URL ‘http://beust.com/eclipse’; into the ‘Work with:’ field
- Click ‘Add’ to add the repository
- Check the box next to the repo and click ‘Next’ and follow the on-screen instructions
- Verify TestNG is installed by right clicking on the project name and select ‘Run As’. TestNG should be one of the selections that pops op.