Setup Selenium WebDriver in Eclipse
Before setting up Selenium WebDriver, first you have to download required softwares and APIs mentioned below. Just follow following steps :-
1. Download and install JAVA – Click Here
NOTE : JAVA is available for both 32 and 64 bit Windows OS. Let say, if your Widnows OS is 64 bit then you have to install 64 bit Java in your System.
2. Download Eclipse IDE compatible with JAVA(No installation required). Just extract the rar file and double click on Eclipse.exe in order to open Eclipse.
3. Download latest selenium standalone jar. Click Here
Eg – selenium-server-standalone-3.**.*.jar
Create your first project in Eclipse
- Create a folder name as “workspace” in any directory of your local machine.
- Double click on Eclipse.exe file in order to open Eclipse IDE.
- Browse the “workspace” folder which you just created.
- Click on OK button and your Eclipse will look like:
- From menu, click on File > New > JAVA project.
- Enter project name, and click on Finish button. Once you click on Finish button, you will see newly created project in Eclipse.
- Create a new folder in project called lib and put the selenium jar into it. In order to create new folder, just Right click on project, click on New > Folder. Enter folder name and click on Finish button).
- Now import selenium Jar into your project so that you can access Selenium web Driver API in your project.
Steps to import Jar
- Right click on your project in the Package Explorer and choose Properties > Java Build Path.
- Choose the Libraries tab, if it isn’t already selected.
- Click on “Add External Jars” button and select selenium jar from “lib” folder and click on OK button.
- Selenium Web driver Jar is successfully imported into your project and now you will be able to access selenium Classes into your project
NOTE : All the external Jars are displayed in your Project under Referenced Libraries section. Here, we have just added only Selenium Jar in project and you will be to see the same in Referenced libraries section.
If you really like the information provided above, please don’t forget to hit a like on Facebook Page, you can also leave a comment.