1. Eclipse (Development Environment)
  2. Selenium Jars (Jars)
  3. Chrome driver/ Firefox driver


  • Launch the eclipse and create new Maven project
  • Add Group Id and Artifact Id and select Finish

  • Right click on the project name from the package explorer and add new class.

  • Right click on the project and select build Path –> Configure build path
  • Add the required jars for selenium or use maven repository and configure the .pom file
  • Provide the driver path in the property. Consider the chrome driver
  • System.setProperty(“”, “/Users/username/Downloads/chromedriver”)

  • Create an object for chromeDriver.
  • WebDriver driver = new ChromeDriver();

  • Launch the website using get method.
  • driver.get(“”);

  • Select the element and perform action.
  • driver.findElement(“signIn”)).sendKeys(“”);

  • Tap on the errors and import the respective classes from the jars.
  • Finally the Web automation code looks like:
  • package; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import; public class Test { public static void main(String args[]) throws InterruptedException { System.setProperty(“”, “/Users/krishnachaitanya/Downloads/chromedriver”); // WebDriver driver = new FirefoxDriver(); WebDriver driver = new ChromeDriver(); driver.get(“”); Thread.sleep(5000); driver.findElement(By.linkText(“Sign Up”)).click(); Thread.sleep(1000); driver.findElement(“signIn”)).sendKeys(“”); driver.findElement(“pass”)).sendKeys(“123456”); driver.findElement(“loginbutton”)).click(); } }

  • Execute/Run the class.
  • This will perform the following actions
    • launch the chrome browser
    • Open facebook page
    • Enter email and password
    • tap on log in button
Categories: Selenium


What I love doing: Identifying and analyzing business problems with technology, convert Traditional testing methodologies to Automation testing using emerging testing technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *