How to Install Selenium Your Computer?

How can you install Selenium on your computer?

Selenium is the most popular tool used by QA Engineers all over the world. Because it is user-friendly and has multiple additional functions. It is used to automate web app testing. C#, Java, Perl, PHP, Python, and Ruby are the languages used in Selenium. Selenium has three libraries: IDE, WebDriver, and Grid. In this article, we will see how to set up Selenium on your computer using the Ellipse tool.

Installation and Setup of Selenium

The process of installing Selenium involves the following steps, namely:

  • Install Java
  • Install Eclipse IDE
  • Install Browser Drive
  • Install TestNG

1. Install Java

Java is one of the languages ​​used to write Selenium automation scripts. Selenium also supports other languages ​​like Python, Ruby, C#, JavaScript, etc. Selenium with Java is the preferred and widely used language of automation testers compared to other languages. Follow the steps below to complete the Java installation

You can refer below link to install and configure Java on your computer: https://www.oracle.com/java/technologies/downloads/

2. Install Eclipse IDE

The Eclipse is one of the most used Integrated Development Environment (IDE) by Java developers. Install the Eclipse IDE from the Eclipse website. It serves as a platform for coding and writing your test cases.

Go through this link  https://www.eclipse.org/downloads/ and select the Eclipse IDE 2022‑06 and download it.

Download Eclipse IDE

Select the download file and launch it.

Run as Administrator

Select the Eclipse IDE for Java Developers and install it.

We chose the Eclipse with Maven platform here because Maven is the ultimate build testing tool and is used to check for build issues between framework components when multiple test engineers edit their files into the same framework integrate.

Eclipse installer

After installing the Eclipse, create the Maven project and open the pom.xml file to set Maven dependency.

Package explorer

Go to this link: https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java and select the version (it is good to select the latest version), copy the maven dependency and paste it into the POM file.

Install Browser Driver

Through WebDriver, Selenium helps all main browsers such as Chrome/Chromium, Firefox, Internet Explorer, Edge, Opera, and Safari. Using the following link, download the relevant Browser Driver – ChromeDriver (for Chrome), GeckoDriver (for Firefox), SafariDriver(for Safari), and InternetExplorerDriver and MSEdgeDriver (IE and Edge respectively).

Go to the link below and get your required WebDriver: https://www.selenium.dev/downloads/

Selenium

After downloading the exe file then it should be added to the created maven project.

TestNG Installation and Setup

TestNG is an open-source test automation framework for Java. It's pretty easy to install TestNG. If you're using Eclipse IDE, it comes as a plugin. Below are the steps to install TestNG.

Once installed Eclipse IDE, go to help and navigate to the ‘Eclipse Marketplace.’

Eclipse Marketpalace

Click on ‘Eclipse Marketplace’. Type TestNG in the search box and click the ‘Go’ button. Now, you will see search results with "TestNG for Eclipse" at the top as below. Then click the “Install” button.

TestNG for Eclipse

Resolving functions would possibly take a couple of minutes. After that, you want to confirm that the checkbox for TestNG is checked and click on the Confirm button.

Selected features

Select the ‘Keep my set up the same’ alternative and once more click on the Confirm button.

Confirm

Now, accept the license and click on the Finish button.

Installation Complete

You will have to restart Eclipse, and you will now be able to see TestNG installed by right-clicking on any project and in the menu options.

TestNG


Similar Articles