In this post, I will guide you on how you can Install Selenium In Windows in a simple guide. You just need an active internet connection and browser, rest everything is covered.
Before we start the process just want to highlight that Selenium supports multiple languages like Java, C#, Python, JavaScript, PHP etc. Here we will be covering with Java.
In case you want to automate application using Python or C# or JavaScript then I have dedicated videos on my channel and I will give you the links for reference.
Selenium with Python
Selenium with C#
Selenium with JavaScript
How To Install Selenium In Windows Step by Step
In order to use Selenium with Java, we need to make sure Java is installed in the Local System.
Note- I would recommend you to use Java 8 at this moment which is stable with all Selenium versions.
Step 1- Open command prompt and type java -version and make sure you get Java Version
Step 2- Download your favorite editor like Eclipse, IntelliJ, NetBeans, etc. This post will focus on eclipse.
Download Eclipse for from their official website
https://eclipse.org/downloads/
Here you will get so many flavors of eclipse IDE you can select first which is coming to Eclipse IDE for Java Developers based on your requirement select 32 or 64 bit.
Here we will select 32-bit windows
Let’s wait for download window to appear, now click on OK button to start download
Once download will finish, start to extract the zip file and wait for the extraction process to finish. It will take around 15 min to finish.
Once the extraction process will finish you will get eclipse-standard folder
Open eclipse folder
Open Eclipse.exe
We are done Configure Eclipse for Selenium
Download Selenium Jars and add into the project
Selenium Webdriver is a collection of Java library with some predefined methods which help you to automate browsers. If any control goes out of the browser then Selenium will not be able to handle it.
Selenium Webdriver also is known as Selenium 3 and in future, you will get as Selenium 4
I also have a detailed video on complete installation which covers the installation of Java, Selenium.
In Java term collection of library is packed into jar files (Java Achieve file).
Step 1- Open any browser and navigate to https://www.selenium.dev/downloads/
Step 2- Navigate to Selenium Server section
Step 3- We will also download the Selenium server, one jar is enough if you want to start the automation.
Step 4- Create a normal java project > Right click on Project > Click on build path > Click on configure build path >Click on library> Click on external jar> add the downloaded jar and click on Apply then ok button.
Now you can start automating application using Selenium.
Configure Eclipse with TestNG
You can also use one of the testing framework called TestNG which will offer different methods and classes which will help us create a robust framework. You can also use the JUnit framework as well but TestNG is more powerful than JUnit.
You can install in different ways
2- Using install new software section.
Open eclipse
Step 2- In eclipse, we have some default plugin available now we will install external software into eclipse.
Click on Help then Install new software
Step 3- We have to provide TestNG url so that eclipse can fetch TestNG plugin
Step 4- To get TestNG url please visit http://testng.org/doc/download.html and copy the below mention URL and paste the same URL in Eclipse and Press Enter
Select TestNG checkbox
Click on Next
Step 5- Accept the term &condition, and click on the finish button.
During installation, it will ask you to restart eclipse so please go-ahead to restart eclipse.
Once everything is installed you can start Automation any application.
You can follow the below tutorial next to get started.
Next: How To Start Chrome Browser in Selenium
Ankit says
hi sir
can give me link where is your pom.xml code
Mukesh Otwani says
Hi Ankit,
Please check this link http://learn-automation.com/selenium-maven-build-and-usage/
yashmin rath says
Hi Mukesh,
I am not able to install firebug and firepath using my firefox.
Mukesh Otwani says
Hi Yashmin, firebug and firepath is no longer support, Please use ChroPath https://www.youtube.com/watch?v=kjTsGnkPQEc
Priyanka Patel says
Hi Mukesh,
On my Windows 64 bit Machine now i had installed latest version of Eclipse i.e Version: 2019-12 (4.14.0)
on this version i am not able to download Testng from both Marketplace as well as from URL.
Please help me on the same.
on their official site also i have posted the issue but no response till yet.
Mukesh Otwani says
Hi Priyanka,
Please follow below steps
1. Click “Help -> Install New Software…” on top level menu
2. Paste the url https://dl.bintray.com/testng-team/testng-eclipse/ to Work with: text field and press enter.
3. Select the plugins
4. Click “Next” button and accept the license to complete the installation.
5. Restart Eclipse
PRIYANKA PATEL says
Hi MuKesh,
Thanks for your immediate response.
I had followed all above steps mentioned by you but it is still not working on latest version.2019-12 (4.14.0)
Mukesh Otwani says
Hi Priyanka,
In the same way i.e. Help-> Install New Software-> Click on link already installed -> Search for TestNG
pradeep says
Hi Mukesh,
while installing new TestNg why I am getting below error. Please look into this. Thanks..
Work with-https://beust.com/eclipse
Error log-
Unable to read repository at https://beust.com/eclipse/content.xml.
Unable to read repository at https://beust.com/eclipse/content.xml.
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Mukesh Otwani says
Hi Pradeep,
Use http instead of https
pradeep says
Thanks Mukesh. The installation is complete.
Mukesh Otwani says
Hi Pradeep,
Great…!!!
priyanka says
hiii i didnt get next option after copy paste URL in eclipse
what should i do?
Mukesh Otwani says
Hi Priyanka,
Are you installing it in your organization network?
There is other way to install testng plugin, go to Help menu at top-> Eclipse MarketPlace-> Search for TestNG -> Click Install button.
While loading Eclipse MarketPlace itself, if it shows error then probably network firewall is restrictin gyou to install plugin from outside your network.
Swapnil says
hey,
this page contains configuration of eclipse for selenium and TestNG. but what about selenium webdriver??
Mukesh Otwani says
Hi Swapnil,
For Selenium WebDriver integration with eclipse, you can visit Module 2 on this link http://learn-automation.com/selenium-webdriver-tutorial-for-beginners/
mukesh says
Hi,
what is the use of “selenium-java-3.0.1” file
Mukesh Otwani says
Hi Mukesh,
Kindly check the logs https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG
mukesh says
Hi,
I have some query regarding the run as configuration.
How are you getting TestNG test option in run option. I have installed TestNG plugin for eclipse but i am not getting this option.
Mukesh Otwani says
I would suggest you to install latest version on Eclipse (Neon)
Rakesh says
Hi Mukesh,
I regularly following your posts and find its useful. Good work and keep doing…&Pls send me the link of tutorial to handle dropdown in a form
Mukesh Otwani says
Yes Rakesh, here you go http://learn-automation.com/handle-dropdown-in-selenium-webdriver/
Prakash says
Dear Sir,
Few point want to discuss with your Sir,
1. My Question is regarding TestNG. How to use this tool in eclipse, do you have taken any topic on it, If so please provide me the link to learn it.
2. More over, while I am trying to all installation eclipse and the jar file of selenium how do i ensure that its working fine. I have reading your topic one by one to understand more clearly.
3. I have few more question based on your reply for this.
Thanks for your wonderful support and document what you gave provide us till now in your blog.
Regards,
Prakash
Mukesh Otwani says
Hi Prakash,
1- Yes TestNG can be installed using this http://learn-automation.com/how-to-install-testng-in-eclipse/
2- If scripts works fine then installation/ configuration is done. For Java you can use java -version
3- most welcome your next doubts.
sekhar das says
sir u r just osm n genius….i m ur big fan..
Mukesh Otwani says
Hey Sekhar,
You made my day today 🙂 Thank you. Let me know if any help.
Bala says
Hi Mukesh,
I have a requirement to read browser console error log using selenium. I want to read all java script errors from the navigated webpage. I have to run this script from all the browsers(IE, Chrome, Safari, Mozilla…). Please suggest how to proceed…..
Mukesh Otwani says
HI Bala,
Not sure on this 🙁
Mahesh says
Hi Mukesh,
My question is how to integrate the existing Testng with the new project..
Mukesh Otwani says
Hi Mahesh,
You can import projects in eclipse.http://learn-automation.com/eclipse-tips-and-tricks/
prem says
Mueksh thanks for your wonderful assistance by the way ..keep going!!!
Can you please mention how to configure the Selenium2 jar files into eclipse. we missed from the above step. thanks
Mukesh Otwani says
Hey Prem,
You can download Selenium jars from seleniumhq.org and add into your project.
SATHISHSANKAR says
i am new to automation testing, this document is very useful to understand very easily.
Mukesh Otwani says
Thanks Satish
palla says
iam new to automation testing, It is very clear to understand, actually i spent lot of time to knew and to get into it. After reading this felt very happy this topic covers everything to work with selenium 2 or web driver installation process.
Thank you
Mukesh Otwani says
Thanks Sai 🙂 Glad to know you find it usefull.
Sreekumar says
Fantastic guidance for installing eclipse and Test Ng. Very useful
Mukesh Otwani says
Thanks Sree Kumar 🙂
Sreekumar says
can you post a tutorial or code for clicking on the menu bar with some drop down once that execution is done and then navigating to the next menu.
Mukesh Otwani says
Hi Sree,
will upload soon.
Pranoy says
awsome
Mukesh Otwani says
Thanks Pranoy