Coding Fun Java Selenium Class 21 – Selenium WebDriver Environment Setup

Selenium Class 21 – Selenium WebDriver Environment Setup

Download Java & Install, Set Environment Variable Path, Download Selenium Java Language binding, Selenium WebDriver Environment Setup and Write first Selenium Test Case using Element Locators and WebDriver API Commands.
Selenium WebDriver for Functional and Regression Testing of Web Applications in System Testing Level, Selenium’s Tool Suite, Selenium WebDriver Features and Drawbacks of Selenium WebDriver.

Tags: , , , , , , ,

6 thoughts on “Selenium Class 21 – Selenium WebDriver Environment Setup”

  1. getting error
    illegal state exception
    set path webdriver.gecko.driver system property

  2. Guru Raj says:

    sir iam getting error could not find the mail class how can i solve plz help me

  3. Selenium Class 21: Selenium WebDriver Environment Setup
    i) Selenium WebDriver Environment Setup
    ii) Write first Selenium Test Case and Execute
    i) Selenium WebDriver Environment Setup

    Choose Selenium Tools and others for Test Automation:
    Eclipse IDE for writing Test Scripts, Java for Programming,
    Selenium WebDriver for writing Test Steps, TestNG Testing Framework as Test Runner,

    i) Download and Instal Java Software (Java Development Kit (JRE(JVM)))
    to create and execute programs/Test scripts
    ii) Set Environment variable path (Path Variable) to use/access Java software from any directory in our computer.
    iii) Download and Extract Eclipse IDE – to write and execute Java code.
    iv) Download Selenium WebDriver Java Language binding from selenium official website (
    and add WebDriver Jar files to Java project in Eclipse IDE
    v) Download Browser driver/s (Instantiate/Set path the Browser Driver in our Test Cases)
    Add selenium WebDriver Jar files to Java Project

    > Launch Eclipse IDE
    > Create Java Project/Select Java Project and right click
    > Build Path
    > Configure Build path
    > Select Lib "Libraries" tab
    > Add "External JARs"
    > Browse path of the external JAR files and add
    > Apply
    > OK


    ii) Write first Selenium Test Case and execute

    Manual Test Case:

    Test Case ID: gcrshop_admin_TC001

    Test Case Name: Verify Admin Login in gcrShop Application Admin Interface

    Test Steps:

    1) Launch the Browser
    2) Navigate to gcrShop Admin interface (
    3) Enter "Username"
    4) Enter "Password"
    5) Click "Login" Button

    Input / Test Data:

    1) Username: "admin"
    2) Password: "admin@123"

    Expected URL:

    Actual: * After the Test Case Execution

    Test Result: Pass/Fail (* After the Test Case Execution)


    Selenium WebDriver Test Case:

    Elements in this Navigation:

    Element Name Element Type Locator Value
    1) Username – Edit Box – name – username
    2) Password – Edit Box – name – password
    3) Login – Button – id – tdb1


    Inspect the Elements
    Google Chrome – Use Built-in developer tools (F12) to inspect elements in the web pages


    package abcd;

    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;

    public class AdminLogin {

    public static void main(String[] args) {
    //Instantiate the Chrome Browser Driver
    System.setProperty("", "E:/chromedriver.exe");

    //Create Chrome Browser Driver
    WebDriver driver = new ChromeDriver(); // Launch the browser with blank URL

    //Navigate to gcrShop Admin Interface



    String url = driver.getCurrentUrl();

    if (url.equals("")){
    System.out.println("Admin Login is successfully – Passed");
    else {
    System.out.println("Admin Login is Unsuccessfully – Failed");


  4. excellent classes sir… regularly following your videos by me and my friends…

  5. Fuad Kh says:

    Very helpful. Thanks.

Leave a Reply

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