First Selenium Project in Eclipse (Java Setup)
By Bhau Automation
🎯 What You Will Learn
- How to create Java project in Eclipse
- Download Selenium WebDriver JAR files
- Configure build path in Eclipse
- Create first Selenium automation script
📌 What is Selenium?
Selenium is an open-source automation tool used for testing web applications. It supports multiple programming languages like Java.
🛠 Step 1: Create Java Project in Eclipse
- Open Eclipse IDE
- Click on File → New → Java Project
- Enter Project Name
- Click Finish
⬇ Step 2: Download Selenium JAR Files
- Go to Selenium official website
- Download Java WebDriver
- Extract ZIP file
⚙ Step 3: Configure Build Path
- Right click project → Properties
- Go to Java Build Path
- Add External JARs
- Select all Selenium JAR files
💻 First Selenium Script
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class FirstTest {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.get("https://google.com");
System.out.println(driver.getTitle());
driver.quit();
}
}
🚨 Common Issues
- Build path not set correctly
- ChromeDriver version mismatch
- JAR files not added properly
🎥 Watch Full Tutorial
🎓 Key Takeaways
- Always configure build path properly
- Use correct driver version
- Start with simple automation scripts
🚀 Created by Bhau Automation