0% found this document useful (0 votes)
4 views2 pages

Selenium Eclipse Setup Guide Roman Hindi

This document provides a step-by-step guide for installing Selenium in Eclipse. It covers the installation of Eclipse IDE, Java JDK, creating a Java project, adding Selenium JAR files, downloading and setting up ChromeDriver, and writing a simple Selenium test code. Additional tips are included for ensuring compatibility between WebDriver and browser versions.

Uploaded by

eliassannu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Selenium Eclipse Setup Guide Roman Hindi

This document provides a step-by-step guide for installing Selenium in Eclipse. It covers the installation of Eclipse IDE, Java JDK, creating a Java project, adding Selenium JAR files, downloading and setting up ChromeDriver, and writing a simple Selenium test code. Additional tips are included for ensuring compatibility between WebDriver and browser versions.

Uploaded by

eliassannu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Selenium Installation in Eclipse - Step-by-Step Guide

Step 1: Eclipse IDE Install Karein

1. Website se download karein: https://www.eclipse.org/downloads/

2. Eclipse IDE for Java Developers install karein.

Step 2: Java JDK Install Karein

1. Java JDK download karein: https://www.oracle.com/java/technologies/javase-downloads.html

2. Install karne ke baad JAVA_HOME environment variable set karein.

Step 3: Eclipse Mein Java Project Banayein

1. Eclipse open karein.

2. File > New > Java Project par click karein.

3. Project ka naam daalein jaise 'SeleniumTest'.

4. Finish par click karein.

Step 4: Selenium JAR Files Add Karein

1. Selenium Java libraries download karein: https://www.selenium.dev/downloads

2. ZIP file extract karein - aapko selenium-java-x.x.x.jar aur 'libs' folder milega.

3. Eclipse mein project par right-click karein > Build Path > Configure Build Path > Libraries > Add External JARs.

4. JAR file aur libs folder ke sabhi JARs add karein.

Step 5: ChromeDriver Download aur Set Karein

1. Visit karein: https://chromedriver.chromium.org/downloads

2. Apne Chrome browser version ke hisaab se driver download karein.

3. chromedriver.exe ko kisi known folder mein save karein jaise C:\WebDriver\chromedriver.exe

Step 6: Selenium Code Likhein

Neeche diya gaya Java code use karein:

import org.openqa.selenium.WebDriver;
Selenium Installation in Eclipse - Step-by-Step Guide

import org.openqa.selenium.chrome.ChromeDriver;

public class MyFirstTest {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "C:\\WebDriver\\chromedriver.exe");

WebDriver driver = new ChromeDriver();

driver.get("https://www.google.com");

System.out.println("Page title is: " + driver.getTitle());

driver.quit();

Extra Tips

- Hamesha WebDriver version ko browser ke version ke saath match karein.

- Agar aap Edge ya Firefox use kar rahe ho to EdgeDriver ya GeckoDriver ka use karein.

You might also like