Next-Gen App & Browser
Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How do I install Selenium and set up the environment for testing?

To install Selenium and configure the test environment, we'll use the Eclipse IDE to write test scripts, Java as the programming language, and TestNG as the framework. However, you can use your preferred IDE, programming language and testing frameworks.

Following are the steps to install Selenium.

  • Install the latest version of JDK. The JDK contains the JRE (Java Runtime Environment), which is used to write and run Java code. You can get JDK from OpenJDK or Oracle JDK.

  • Once the JDK installation is complete, set the environment variables.

  • Now install the Eclipse IDE. Here we will use Eclipse IDE for Java Developers.

  • Download the Selenium Client Library for Java. Extract the JAR files and save them to a folder.

  • Finally, if you are executing your test scripts on your local machine, you must have its respective browser driver installed. However, if you wish to run test on the cloud, you can skip this step.

Once you have installed Selenium, it’s time to set up your project. For demonstration, we will create a Java project in Eclipse.

  • Open Eclipse IDE and create a Workspace.
  • How do I install Selenium and set up the environment for testing
  • Create a new Java project by going to File > New > Java Project.
  • How do I install Selenium and set up the environment for testing
  • A pop-up window will appear. Enter your Project name, choose a location to save your project, and select Use an execution environment JRE.
  • How do I install Selenium and set up the environment for testing
  • Now, you need to add Selenium API JAR files to your project. Right-click on the project and select Properties.

  • Select Java Build Path and click Add External JARs.
  • How do I install Selenium and set up the environment for testing
  • Add the JARS files for the Selenium Java Client. Navigate to the folder where you extracted the JAR files.
  • How do I install Selenium and set up the environment for testing
  • Once the JARs files are added, click Apply and Close.
  • How do I install Selenium and set up the environment for testing

    You are now ready to write and execute your Selenium scripts.

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...
ShadowLT Logo

Start your journey with LambdaTest

Get 100 minutes of automation test minutes FREE!!

Signup for free