I need your help to wire things related to selenium. Now over the past few weeks I have been reading about Selenium documents. There is selenium IDE (a firefox extension for record and replay tests) Selenium RC - (selenium 1.0). This seems to be deprecated now and uses a proxy HTTP server to run test on multiple browsers. Selenium Web Driver - (selenium 2.0). This is the latest one and one which should be used now for automated tests. (Each browser implements Web Driver API) I also read that web driver interacts with native browser support for automation and does not require HTTP server.
Then there is this Selenium server. (selenium stand alone server written in java) The interaction with selenium server is via JSON wire protocol. (where each language binding call selenium server passing JSON data over HTTP)
Now I have the following question :
Does the Selenium server same as the proxy server used in selenium RC?
Does the selenium RC uses JSON wire protocol.
Where is selenium server fits in Selenium 2.0, if web driver interacts with native browser support for automation.
Lets say I am running my tests using selenium 2.0, java client library, in chrome browser. When I call a WebDriver API, how does it interacts with chrome driver? Does it uses JSON wire protocol?
... I have more questions, but needs the answer of the above ones to clear Selenium cloud in my head.
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.