Articles → SELENIUM → Create your first selenium project

Create your first selenium project






WebDriver class





Create your first selenium project








Picture showing the New - java project menu option for creating the new Java project

Click to Enlarge



Picture showing the popup window for entering the project name

Click to Enlarge



Project showing the project in the package explorer

Click to Enlarge



Picture showing the New - Package option for adding the new package in the project

Click to Enlarge



Picture showing the popup window for entering the package name

Click to Enlarge



Picture showing the New - Class option for adding the class in the package

Click to Enlarge



Picture showing a popup window for entering the class name

Click to Enlarge



Picture showing the Build path -Configure build path option for configuring the build path

Click to Enlarge



Picture showing a window for adding external jar files

Click to Enlarge






Download IEDriverServer




Picture showing a browser window for downloading the IEDriverServer.exe file

Click to Enlarge


Write your first selenium code




package com.FirstSeleniumProject;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class MyClass {

  public static void main(String[] args) {
    WebDriver driver;
    String service = "IEDriverServer.exe path";
    System.setProperty("webdriver.ie.driver", service);
    driver = new InternetExplorerDriver();
    driver.get("http://google.com/");

  }
}



Output




Picture showing the output of your first selenium project

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, March 26, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250