Basic Selenium

How To Install Selenium In Windows Step by Step

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

Verify Java Installed

 

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

Install Selenium In Windows

 

Install Selenium In Windows

Let’s wait for download window to appear, now click on OK button to start download

Install Selenium In Windows

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.

Install Selenium In Windows

 

Install Selenium In Windows

Once the extraction process will finish you will get eclipse-standard folder

Install Selenium In Windows

Open eclipse folder

Install Selenium In Windows

Open Eclipse.exe

Install Selenium In Windows

We are done Configure Eclipse for Selenium

Install Selenium In Windows

 

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.

Selenium Jar download

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

1- From Eclipse Marketplace

2- Using install new software section.

Open eclipse

Install Selenium In Windows

Eclipse home page

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

Install Selenium In Windows

Click on help

 

 

Step 3-  We have to provide TestNG url so that eclipse can fetch TestNG plugin

Install Selenium In Windows

Specify the URL

 

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

 

Install Selenium In Windows

Copy download URL

Install Selenium In Windows

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.

Install Selenium In Windows

Click on Finish.

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

Next: How To Start Firefox Browser in Selenium

Next: How To Start IE Browser in Selenium

42 thoughts on “How To Install Selenium In Windows Step by Step

  1. Ankit says:

    hi sir
    can give me link where is your pom.xml code

  2. yashmin rath says:

    Hi Mukesh,
    I am not able to install firebug and firepath using my firefox.

    1. Hi Yashmin, firebug and firepath is no longer support, Please use ChroPath https://www.youtube.com/watch?v=kjTsGnkPQEc

  3. 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.

    1. 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

      1. 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)

        1. Hi Priyanka,

          In the same way i.e. Help-> Install New Software-> Click on link already installed -> Search for TestNG

  4. 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

    1. Hi Pradeep,

      Use http instead of https

      1. pradeep says:

        Thanks Mukesh. The installation is complete.

        1. Hi Pradeep,

          Great…!!!

  5. priyanka says:

    hiii i didnt get next option after copy paste URL in eclipse
    what should i do?

    1. 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.

  6. Swapnil says:

    hey,
    this page contains configuration of eclipse for selenium and TestNG. but what about selenium webdriver??

    1. Hi Swapnil,

      For Selenium WebDriver integration with eclipse, you can visit Module 2 on this link https://vistasadprojects.com/mukeshotwani-blogs-v2/selenium-webdriver-tutorial-for-beginners/

  7. mukesh says:

    Hi,
    what is the use of “selenium-java-3.0.1” file

  8. 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.

    1. I would suggest you to install latest version on Eclipse (Neon)

  9. 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

  10. 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

    1. Hi Prakash,

      1- Yes TestNG can be installed using this https://vistasadprojects.com/mukeshotwani-blogs-v2/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.

  11. sekhar das says:

    sir u r just osm n genius….i m ur big fan..

    1. Hey Sekhar,

      You made my day today 🙂 Thank you. Let me know if any help.

      1. 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…..

        1. HI Bala,

          Not sure on this 🙁

  12. Mahesh says:

    Hi Mukesh,

    My question is how to integrate the existing Testng with the new project..

  13. 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

    1. Hey Prem,

      You can download Selenium jars from seleniumhq.org and add into your project.

  14. SATHISHSANKAR says:

    i am new to automation testing, this document is very useful to understand very easily.

  15. 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

    1. Thanks Sai 🙂 Glad to know you find it usefull.

  16. Sreekumar says:

    Fantastic guidance for installing eclipse and Test Ng. Very useful

    1. Thanks Sree Kumar 🙂

    2. 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.

      1. Hi Sree,

        will upload soon.

  17. Pranoy says:

    awsome

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.