0% found this document useful (0 votes)
437 views

Selenium Eclipse Setup

This document provides instructions for setting up Selenium with Eclipse. It includes downloading Eclipse, Java, Selenium, and a web browser driver. It then outlines configuring an Eclipse project to use Selenium by importing the Selenium jars and writing a sample program to launch a browser using the FirefoxDriver.

Uploaded by

Cadi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
437 views

Selenium Eclipse Setup

This document provides instructions for setting up Selenium with Eclipse. It includes downloading Eclipse, Java, Selenium, and a web browser driver. It then outlines configuring an Eclipse project to use Selenium by importing the Selenium jars and writing a sample program to launch a browser using the FirefoxDriver.

Uploaded by

Cadi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

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.

Download the appropriate version and also there is a different version of the
eclipse available, you can download any one of them.

Download link

Setup Requirement:
1-. Java 8 (minimum)
2- Eclipse
3- Selenium server
4- Web Browser Driver

Download Selenium
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”.

Download link

Download Web Browser Driver

Download web browser Driver from selenium.dev official websites


Here the link of driver of Firefox
Configure Eclipse and create a project.

● 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 is and click finish.
● Right-click src – New – Class– <name of Class>. This will create a new
Class.

Selenium Webdriver install in Java Project


After successfully installing eclipse the next task is to add the selenium jars
which you download from the Selenium Official website.

● Right-click project name

● Click on Build Path


● Click on Configure Build Path

● Go to 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.

Import Web Browser Driver


Write program import of Webbrowser Driver.
[
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Demo {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver",
"/home/test/Downloads/geckodriver");
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.com"); }}
]
Run the program.

You might also like