Set Up Selenium WebDriver Java Client
One of the most important advantages of Selenium WebDriver is that it comes in several language bindings to suit the needs of software projects and developers. Developers can choose the Selenium client driver of the programming language they are comfortable in. In this tutorial, we will go through the process of setting up the client driver for Java.
There are as such no pre-conditions for downloading Selenium WebDriver Java client. But to start using it for writing automation scripts, you need to include or import it in your Java project. Some basic things which should be completed before you can use Selenium WebDriver Java client are
- Java should be downloaded and installed
- Java environment variables JAVA_HOME and Path should be set
- Eclipse IDE (or any other editor) should be working in the machine
- Java project should be created in the Eclipse where you can import Selenium WebDriver jars.
To download Selenium WebDriver Java client, follow the steps given below:
- Go to the official website of Selenium https://docs.seleniumhq.org/download/.
2. Goto Selenium Client & WebDriver Language Bindings section on the page and click on the download link next to Java Binding. As you can see, client drivers for other language bindings are also available in the same section. The client version available for download is mentioned next to the language.
Note: If you want to download any other version of Selenium WebDriver jar, you can go to their storage website following the link https://selenium-release.storage.googleapis.com/index.html
3. Save the compressed zip folder at a preferred location. I have saved it in my downloads folder.
4. Unzip the compressed folder to extract all the files. Select a folder where you want to save your Selenium Jars.
5. All the files will be extracted and stored in the folder selected for extraction. These files are the files which you need to import into your Java project to start using Selenium jars.
Features of Webdriver Java client
The Selenium folder consists of the libs folder, changelog, client jars, license and notice files. The libs folder further contains various jars. You need to import all of the jars from libs and Selenium folder to your project to start writing Selenium scripts.
In this tutorial, we downloaded the WebDriver Java Client from its official download website. We extracted the zip file into our local machine to get all the jars. Now we can import these jars into our Java project in Eclipse to start writing Selenium Code.