Automation Environment Setup – Selenium WebDriver: Welcome to another new post of Selenium Tutorial series, In the last post we have discussed the different components of selenium and Selenium introduction. If you have not to check yet you can follow the link to read that. In this post, we are going to learn how to download Eclipse and Set-up Selenium WebDriver and Eclipse in your Machine so that you can start execution and practice.
Java Automation Environment Setup
We are Writing our selenium automation script in Java we need to install Java on our system, so to install Java properly in your system you can follow the below posts:
- Java Installation on Windows
- Set JAVA_HOME on Windows
Selenium Eclipse Setup
Eclipse is one of the famous editors which is mainly used for writing different programming languages and also to execute those programs. So to Download the latest version of Eclipse follows the Eclipse Download link. As per your system configuration (32 or 64 bit) download the appropriate version and also there is a different version of the eclipse is available, you can download any one of them.
If you have no idea what type of operating system then you can go to My computer – properties, there you can find Your system configuration details.
Setup Selenium WebDriver Client | Selenium Jar Download
For Download selenium webDriver latest version you can visit the Selenium Official Website Selenium.dev, where you can download the latest version of Selenium webDriver. After Visiting Selenium’s official website you need to go to “Selenium Client & WebDriver Language Bindings”. There you can find different languages Selenium is present and as per our requirement, you need to download the Java Version. You can use this link to download other versions of Selenium Webdriver.
After Successfully Download, that Unzips that on a directory as a library folder.
Configure Eclipse With WebDriver ( Install Selenium Webdriver )
- You can launch the Eclipse by double click on the “eclipse.exe” file inside the “eclipse” folder.
- When you execute for the first time that time it will ask to select the workspace, accept the location, and click ok.
- Click on File – New – Other- Type Java Project in the text box and then click Next.
- You, Will, get a Create a Java project popup, enter the project name, and keep the other configuration as it as and click finish.
- Right-click src – New – Package – <name of package>. This will create a new package.
Selenium Webdriver install in Java Project
After successfully install eclipse the next task is to add the selenium jars which you download from the Selenium Official website. In the official website, the selenium Jars are available in 2 places
- Selenium Jar Having all the jar files, here you will get multiple associate selenium jar files. you can download it from the below location.
- Selenium also shares another version of Jar files, that’s called a Standalone jar file which is a single file which has all the required files in it, you can download from here.
How to Add Selenium package
After downloading those Jar files to add in your eclipse project you follow the below steps.
Right-click project name – Build Path – Configure Build Path – Libraries – Add External Jar – navigate to the path where jar files are kept (libs folder) – Select the jar file – Click on Apply – Click OK. This will import Selenium jar files.
If you have added the single standalone jar file and if you have added All Jar files then that looks like below pic.
Note: After Successfully import all the jar files when you click apply and ok, in your eclipse editor you can found another new library will be added in the name of “Referenced Libraries” and inside that you can find all your added jar files.
By Following the above step you can set your Environment for Java, Eclipse and Selenium WebDriver, Still, if you face any issue then you can comment in the comment section, we are happy to help you.