Selenium WebDriver and Selenium server

我们两清 提交于 2019-12-01 00:19:59

1- Selenium Server 2.0 is compatible with Selenium RC. The version bump from 1.0 to 2.0 was mainly because they add WebDriver API to the server. So, Selenium Server 2.0 kind of include Selenium RC.

A few months ago they removed the Selenium RC API from Selenium Server, being that the main factor to again bump the version number, this time to 3.0.

Note: You still you can use the RC API with Selenium 3 (using a legacy module that not comes out the box with the Selenium Server .jar), but since the RC API is implemented using WebDriver instead of Selenium Core, some tests could behave differently.

2- No, JSON Wire Protocol is the WebDriver protocol, kind of tie to the WebDriver Interface or API. W3C doc here. The JSON Wire Protocol could be seen as the way to represent in the context of a client/server communication, the commands defined in the WebDriver API binding (e.g. go to an specific URL, click on a element, ...).

3- Selenium Server is a "WebDriver server". Your tests scripts can communicate with it using the JSON Wire Protocol and sends "WebDriver commands". Depending on the capability needed by your tests scripts (e.g. what browser your tests scripts want to use) then the Selenium Server "forward/execute" the commands in one way or another.

If you specified that you want the HtmlUnit headless browser, then Selenium Server will not forward the commands to any other process but execute them using the HtmlUnitDriver that come bundled with the Selenium Server.

If you specified that you want the Chrome browser, then Selenium Server will "forward" the commands to the ChromeDriver(in case of Chrome, the WebDriver driver is a completely separate "WebDriver Server" process).

I this way, Selenium Server is useful to concentrate at one point, outside your tests scripts, all the neccesary burden to deal with several browsers. You can configure it to deal with several browsers.

Besides you can make Selenium Server behave like a grid, and just talk with one endpoint, the hub, that will be in charge to distribute the tests to all the registered nodes.

4- Yes, partially already explained. Just add that you can connect directly from your test scripts to the ChromeDriver if you want.

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