2013-10-03 92 views

回答

10

Selenium Documents

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

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

  1. 您正在使用Selenium-Grid将测试分布到多台机器或虚拟机(VM)上。
  2. 您想连接到具有特定浏览器版本的远程机器,该机器不在当前机器上。
  3. 您没有使用Java绑定(即Python,C#或Ruby)并且想要使用HtmlUnit驱动程序。
+5

Chetan ..谢谢你的回答。但我在寻找“selenium server”和“selenium server standalone”之间的区别,让我的问题更加清晰,我知道我们可以使用两个jar来使用Grid。但在这种情况下,应该选择哪一个。 – Kiran

+0

嗨kiran,这将有助于你https://groups.google.com/forum/#!topic/selenium-users/DlAIGAz5v4o – Chetan

+1

硒RC: - 需要Selenium Stanalone罐单机和网格需要两个罐子。 Selenium Webdriver: - 无需任何文件的单机和网格只需要硒服务器罐。 – Chetan

1

Selenium Server以前被称为硒RC服务器。

我不能说确切的硒服务器独立定义,但我可以说基于版本

在硒服务器独立的服务器是不同的

0

我相信“硒服务器”罐子IS“硒服务器独立“罐子。如果你看看http://www.seleniumhq.org/download/ - 没有“硒服务器”这样的东西。

网格和RC服务器是in the same jar file。 RC(“遥控器”)在Selenium 2中被弃用,在Selenium 3中被模仿。

懒洋洋地说,“selenium server standalone”可以被称为“硒服务器”,因为它就是这样:代理硒网格或其他您想要自动化的远程浏览器。 “独立”是HTTP服务器。

http://www.protractortest.org/#/infrastructure提示在术语差:本地运行,并在远程网格(其为http服务器将任务分配给多个硒服务器“服务器”运行时(独立罐),当它是“独立”,每个运行“独立“罐子)。

0

如果通过Selenium Wiki上的Getting Started页面进入,则会有一个到selenium-release.storage.googleapis.com的下载链接。例如。 3.8 release directory功能:

[DIR] selenium-server-3.8.1.zip    2017-12-01 19:21:38 20.58MB 
[DIR] selenium-server-standalone-3.8.1.jar 2017-12-01 19:17:06 21.79MB 

所以确实有两个版本。看来包装的问题:

selenium-server-3.8.1.zip包含一个文件selenium-3.8.1-nodeps.jar和依赖类.jar文件(“拉链罐子”):

.. 
    ---x------  63504 1-Feb-1985 00:00:00 libs/jcommander-1.48.jar 
    .. 
    ---x------ 857721 1-Feb-1985 00:00:00 selenium-3.8.1-nodeps-sources.jar 
    ---x------ 2137810 1-Feb-1985 00:00:00 selenium-3.8.1-nodeps.jar 

selenium-server-standalone-3.8.1.jar包含相关类和它自己的类作为直接入口(“jar文件中的类文件”):

.. 
-rw-rw-rw-  1014 10-Apr-2015 19:45:56 com/beust/jcommander/DynamicParameter.class 
-rw-rw-rw-  237 10-Apr-2015 19:45:56 com/beust/jcommanderFuzzyMap$IKey.class 
-rw-rw-rw-  2910 10-Apr-2015 19:45:56 com/beust/jcommander/FuzzyMap.class 
    ..