Selenium Webdriver 和 Selenium Server Standalone 之间的区别

Difference between Selenium Webdriver and Selenium Server Standalone

我搜索并找到了我的问题的许多答案,但 none 个让我满意。我的问题,

最初,主要区别似乎是 API(服务器更大)的大小以及 运行 RC 样式脚本和 "remote" Slenium WebDriver 脚本的能力一目了然:

Selenium Server:

The Selenium Server is needed in order to run either Selenium RC style scripts or Remote Selenium WebDriver ones. The 2.x server is a drop-in replacement for the old Selenium RC server and is designed to be backwards compatible with your existing infrastructure.

我推断这包括 WebDriver 的 API 并将用于测试远程代码(参见需求评估)。

Selenium WebDriver:

WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API. WebDriver is a compact Object Oriented API when compared to Selenium1.0

首先,WebDriver 是一个API (with many language bindings and full/partial implementations: Java and C#, WebdriverIO, Protractor, Selendroid, Facebook PHP, etc.), also a specification。它是 API 所有新的 Selenium 工作都应该针对它编写的,并且是唯一的 API 得到完全支持和维护的。

您可以使用各种 WebDriver 实现之一针对各种本地托管的浏览器执行测试,而无需任何服务器 运行。在许多情况下,这就足够了。

但是,如果您需要将测试分布在多台机器/虚拟机上,或者连接到远程网格以访问不同的操作系统和设备,那么您需要连接到 独立服务器(无论是自己主持,还是别人主持,例如SauceLabs)。

忘记 "RC",那是旧技术和旧术语。