What is difference between selenium-server-standalone and selenium-server.

核能气质少年 提交于 2020-02-05 05:22:45

问题


I can see two repository in Maven Central repo. Please clarify what is difference between both jars


回答1:


This is explained in the Selenium documentation:

You may, or may not, need the Selenium Server, depending 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 API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.

There are some reasons though to use the Selenium-Server with Selenium-WebDriver.

  • You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
  • You want to connect to a remote machine that has a particular browser version that is not on your current machine.
  • You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver

The selenium-server-standalone.jar was used in older Selenium versions (with Selenium Server).

Newer versions of Selenium (WebDriver API) uses selenium-java.jar.




回答2:


As per the Selenium Server jar releases, selenium-server-standalone jars are no more pushed to the Maven Artifact.

Till Selenium Release v2.53.0, selenium-server-standalone jars were pushed to the Maven Artifact separately as Jenkins Releases. But starting Selenium Release v3.x only the selenium-server jars and the selenium-java client jars are pushed to the Maven Artifact


Solution

  1. If you running everything on the same machine, then using the selenium-java client maven dependency should be just fine.
  2. If you running something on a machine that's not your desktop, then using the selenium-server maven dependency must be used. In this case you can also embed the Selenium server into your own project by adding the selenium-server dependency to your pom.xml.
  3. If you intent to use the RemoteWebDriver implementation, then you need to download the selenium-server-standalone.jar from the Selenium Downloads page


来源:https://stackoverflow.com/questions/46559491/what-is-difference-between-selenium-server-standalone-and-selenium-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!