Selenium
Selenium
Date: .....................................
Objective
The objective of this lab is to understand and implement web automation testing using Selenium
WebDriver in Java. We aim to automate a simple search scenario on Google to demonstrate the core
functionalities of Selenium.
Step 2: Ensure that Java has been successfully installed on your system by running the command
Step 3: Now, install an Integrated Development Environment (IDE) such as Eclipse, IntelliJ IDEA,
or NetBeans. For this, we are using Eclipse so download it from here.
Step 4: Install the Selenium WebDriver library for Java. Download it from here. Extract the Zip File
and complete the installation.
Step 5: We need web browsers such as Chrome, Firefox, Edge, or Safari. So, for this article
demonstration, we will use the Chrome browser. A ChromeDriver executable file that matches your
Chrome version. Download the latest release from here.
Step 6: Extract the zip file and copy the path where the chromedriver.exe file is, it is required in
further steps. (e.g. – D:/chromedriver_win32/chromedriver.exe)
Step 1: Launch Eclipse and select File -> New -> Java Project.
Step 2: Enter a name for your project (e.g., SeleniumJavaTutorial) and click Finish.
Step 4: Select Java Build Path from the left panel click on the libraries tab and then select Classpath.
Click on Add External JARs and browse to the location where you downloaded the Selenium WebDriver
library (e.g., selenium-java-4.1.0.zip).
Step 5: Select all the JAR files inside the zip file and click Open and also all the files inside the lib
folder. (D:\selenium-java-4.11.0, D:\selenium-java-4.11.0\lib).
Step 9: Create a new class under your package (e.g., WebDriver) by right-clicking on the package
and selecting New -> Class, then Enter a name for your class and click Finish.
Rubrics
Concept 10
Planning and Execution/ 10
Practical Simulation/ Programming
Result and Interpretation 10
Record of Applied and Action Learning 10
Viva 10
Total 50