How to Run the Tests on Your Computer
Learn how to run the automated code on your computer.
Please follow the steps stated below to run the Selenium tests on your computer.
Install Java and Maven
- Install Java JDK. You cannot use Java JRE because Maven only works with Java JDK.
- Install Maven.
Download the code and extract it to a folder
- Download the code archive using the link from the end of this page.
- Extract the files from the zip file in a new folder.
Download the chrome drivers
- Download the chrome driver for Windows from https://chromedriver.chromium.org/.
- Download the chrome driver for Linux from the same link.
Copy the drivers in the project
- Open the new folder that has the code in Windows Explorer.
- Create the
resources
sub-folder in thesrc/main
folder. - Copy the two driver files in the
src/main/resources
folder.
Set the BROWSER environment variable
- Go to
Control Panel > System > Advanced System Settings > Advanced tab > Environment variables
. - Create an environment variable named
BROWSER
with thechrome
value.
Run tests
- Open Command Prompt.
- Make the folder from which you extracted the code the current folder.
- Run the tests with the
mvn clean test
command.
Get hands-on with 1400+ tech skills courses.