Skip to main content
 首页 » 编程设计

python之Selenium 远程 Web 驱动程序 : How to start the remote server from Client

2025年05月04日6bluestorm


我在 Selenium WebDriver (Selenium2) 中有几个问题:

我的第一个问题是,RemoteWebDriver 是否需要一个独立的 .jar 文件?
我的第二个问题是,如果需要独立的 .jar 文件,那么如何使用 Python 从 WebDriver 的客户端(就像在 Selenium RC 中一样)启动这个 .jar 文件/Selenium 服务器?


我知道如何在本地从命令行启动 selenium 服务器。但我想知道 WebDriver 在启动服务器方面是否比 RC 有任何改进。我还知道,如果在本地使用 WebDriver,则不需要 Selenium 服务器(独立的 .jar 文件)。

请您参考如下方法:

  1. 是的,独立的 jar 文件需要处于运行状态,以便使用 RemoteWebDriver 在远程机器上运行测试。
  2. 要运行服务器,只需使用您可能已经知道的 java -jar。

引用:http://code.google.com/p/selenium/wiki/RemoteWebDriver了解更多详情。