Java “Selenium-server-standalone.jar”和“Selenium Client & WebDriver”之间有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26900631/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 03:28:46  来源:igfitidea点击:

What are the differences between 'Selenium-server-standalone.jar' and 'Selenium Client & WebDriver'?

javaseleniumselenium-webdriverselenium-rc

提问by ABCDEFG

What are the Implementations differences between 'Selenium-server-standalone.jar' and 'Selenium Client & WebDriver'. Following is the link from SeleniumHQ.org website [http://www.seleniumhq.org/download/]..

“Selenium-server-standalone.jar”和“Selenium Client & WebDriver”之间的实现区别是什么。以下是来自 SeleniumHQ.org 网站的链接 [ http://www.seleniumhq.org/download/]..

  1. http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
  2. "http://selenium-release.storage.googleapis.com/2.44/selenium-java-2.44.0.zip"
  1. http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
  2. http://selenium-release.storage.googleapis.com/2.44/selenium-java-2.44.0.zip

I know first one is Formerly known as Selenium RC and second one is Selenium 2.0(Webdriver). But Is the latest version supporting all the jars in Webdriver in Selenium Server. I have only Selenium Server available, Did all the method's in Selenium Webdriver supports in Selenium Server? likewise, what are the differences between the jars in it?

我知道第一个以前称为 Selenium RC,第二个是 Selenium 2.0(Webdriver)。但是是支持Selenium Server中Webdriver中所有jar的最新版本。我只有 Selenium Server 可用,Selenium Webdriver 中的所有方法都支持 Selenium Server 吗?同样,里面的罐子有什么区别?

could pls help

请帮忙

/Thanks

/谢谢

回答by Anuragh27crony

I see a bit of confusion here... Regarding "Selenium WebDriver" & "Selenium Server"

我在这里看到了一些混乱......关于“ Selenium WebDriver”和“ Selenium Server

Selenium WebDriver 2.0- helps to write scripts for automating browsers..this package provides us with classes & methods to achieve automation. After writing scripts we can run them on LOCAL MACHINE and see automation ourselves. WebDriver projects were merged with selenium RC to overcome the drawbacks of selenium RC making it selenium WebDriver 2.0

Selenium WebDriver 2.0- 帮助编写自动化浏览器的脚本..这个包为我们提供了实现自动化的类和方法。编写脚本后,我们可以在 LOCAL MACHINE 上运行它们并自己查看自动化。WebDriver 项目与 selenium RC 合并以克服 selenium RC 的缺点,使其成为 selenium WebDriver 2.0

Selenium Server:Now once i have my scripts (as mentioned above),To run scripts on REMOTE MACHINES (Test Beds) and NOT ON LOCAL MACHINE we do it using selenium server. So in short Selenium Webdriverworks together with Selenium Server..they co-exist to help and not to replace each other.

Selenium 服务器:现在一旦我有了我的脚本(如上所述),要在远程机器(测试台)而不是本地机器上运行脚本,我们使用selenium 服务器来完成。所以简而言之,Selenium WebdriverSelenium Server一起工作……它们共存是为了帮助而不是相互替换。

I hope this helps

我希望这有帮助

回答by Naveen Kumar R B

From Selenium WebDriver official Documentation:

来自 Selenium WebDriver 官方文档:

WebDriver and the Selenium-ServerYou 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

WebDriver 和 Selenium-Server您可能需要也可能不需要 Selenium Server,这取决于您打算如何使用 Selenium-WebDriver。如果你的浏览器和测试都在同一台机器上运行,并且你的测试只使用 WebDriver API,那么你不需要运行 Selenium-Server;WebDriver 将直接运行浏览器。

虽然使用 Selenium-Server 和 Selenium-WebDriver 有一些原因。

  • 您正在使用 Selenium-Grid 在多台机器或虚拟机 (VM) 上分发您的测试。
  • 您想要连接到具有当前计算机上没有的特定浏览器版本的远程计算机。
  • 您没有使用 Java 绑定(即 Python、C# 或 Ruby)并且想使用 HtmlUnit 驱动程序

References:

参考:

  1. http://www.seleniumhq.org/docs/03_webdriver.jsp#webdriver-and-the-selenium-server
  1. http://www.seleniumhq.org/docs/03_webdriver.jsp#webdriver-and-the-selenium-server