0

I read this in Quora :

Note: You should make sure if selenium-standalone-server.jar is needed in your case. If all you need is to run a WebDriver test in local machine please add java-client.jar. Its lightweight. Just for extra information, selenium-standalone-server.jar is a bundled jar that contains both API and selenium server. Selenium server is needed to run older Selenium RC tests or to run WebDriver tests in remote machines through Selenium Grid.

Assume that i am not using selenium server standalone jar file. So to run tests in local do i need to use just java-client jars or do i need to add the selenium server jar as well?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
anandhu
  • 686
  • 2
  • 13
  • 40

2 Answers2

0

My understanding is that selenium server is not needed to run local Selenium tests, unless you are using Selenium RC.

More detail is given here: Why we don't need server in Selenium Webdriver?

Brydenr
  • 798
  • 1
  • 19
  • 30
0

These are two distinct cases:

  • Running your Test Suite locally: You can make use of language-specific client drivers. When using Selenium Java Binding Art you can use the jars published as Selenium Java Client

Note: Whether you need the Selenium Server or not depends on how you intend to use Selenium-WebDriver. If your browser and tests will all run on the same machine, and your tests only use the WebDriver APIs, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.

  • Running your Test Suite in a distributed network: There can be some reasons though to use the Selenium-Server i.e. Selenium Standalone Server:

    • If you are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
    • If you want to connect to a remote machine that has a particular browser version that is not on your current machine.
    • If you are not using the Java bindings art (i.e. C#, Ruby, Python, Javascript) and would like to use HtmlUnit Driver.
    • If you are using DefaultSelenium (or the RemoteWebDriver implementation), you still need to start a Selenium Server. The best way is to download the selenium-server-standalone.jar from the Selenium Downloads page and use it.
    • You can also embed the Selenium Server into your own project, if you add the following dependency to your pom.xml:

      <dependency>
          <groupId>org.seleniumhq.selenium</groupId>
          <artifactId>selenium-server</artifactId>
          <version>3.141.59</version>
      </dependency> 
      

      Now you can create a Selenium Server instance yourself and start it.

Note : selenium-server artifact has a dependency to the servlet-api-3.1.0 artifact, which you should exclude, if your project will be run inside a web application container.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352