Friday 11 March 2022

Downloading ChromeDriver, Selenium TestNG Installation and Integration in Eclipse


Tools required: Selenium, ChromeDriver

Pre-requisites: Ubuntu, Java, Eclipse


Downloading ChromeDriver


Chrome ➡ Settings ➡ about chrome ➡ version

Version 99.0.4844.51 (Official Build) (64-bit)

chromedriver.chromium.org

OR

wget https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_linux64.zip

unzip chromedriver_linux64.zip


Selenium Installation


locate selenium

# for locate, sudo apt install mlocate

sudo pip install selenium

OR

Download the Latest stable version from selenium.dev


Integrating Selenium to Eclipse


Open the Eclipse. Create a new Java project. 

Right-click on the project and create a package. 

Create a new class inside the package.

Configure the build path by right-clicking on the created project.

Java  Build Path ➡ Libraries(select class) ➡ Add External JARs(Add Selenium JAR) ➡ 

Apply and Close

See the referenced .jar files in the project to confirm.


Install TestNG


wget http://www.java2s.com/Code/JarDownload/testng/testng-6.8.7.jar.zip

unzip testng-6.8.7.jar.zip


Setting up TestNG in Eclipse


Configure the build path by right-clicking on the created project.

Java  Build Path ➡ Libraries(select class) ➡ Add External JARs(Add Selenium JAR) ➡ 

Apply and Close

See the referenced .jar files in the project to confirm.

Eclipse ➡ Help ➡ Eclipse Marketplace… ➡ Search(testng) ➡ Go ➡ TestNG for Eclipse ➡ Install ➡ TestNG (required) ➡ confirm ➡ I accept the terms of the license agreement ➡ Finish.


No comments:

Post a Comment