'What is the difference between Selenium server and WebDriver (not RC, not Remote, not 4.0)?

Please note that I am not talking about Selenium RC or RemoteWebDriver or the old Selenium server or the standalone server. I am also not talking about Selenium 4.0 so let us not get into that because it simply dodges answering the question.

When we say Selenium-WebDriver, as per my understanding, it is an integration of Selenium code + WebDriver project (which is also the name of the W3C WebDriver specification).

Here is my understanding of the difference so far:

  1. Selenium = the library which supports multiple programming languages. In each language the user creates instances of ChromeDriver / FirefoxDriver etc. which are client libraries that allow the user to write high-level code. This code is converted by these client libraries into an API request with JSON body containing javascript commands. This is sent to the Selenium server through API requests.
  2. The API requests which will be sent to the Selenium server is either converted to the W3C WebDriver format, or maybe the client libraries already do that. I'm not sure which is it.
  3. The selenium server converts the request or simply forwards it to the driver application that is running (Selenium server is supposed to act like a reverse proxy so I think that it simply forwards it) into a format that is understood by the drivers (the W3C specification).
  4. The drivers now interact with the browser. How do they do that? Well, the browsers come built-in with JS libraries to help drive automation. And these drivers are external applications that take REST API requests, and are able to call these JS libraries based on these requests.
  5. When we say WebDriver, it consists of 2 parts. One, the W3C specification. Two, it is also the same name that Selenium has kept for it's client. You are actually creating an instance of "WebDriver" (or "RemoteWebDriver" to be more specific) while writing code. So "WebDriver" is more than just a W3C specification over here. It is also the name of the Selenium client implementation. (I have no idea why they decided to keep the same name which made it so confusing - it's like creating a microservice called as "REST API microservice").

Qs A: Is my understanding of the concepts correct? I cannot get a clear answer anywhere because all answers/discussions on the web are simply dodging answering the question by quoting from the official docs (which are pretty vaguely worded).

Qs B: Does the Selenium server modify the response in any way before sending it to the driver? If yes, then can we say that in this case the "Selenium server" has become the client and driver has become the server?

Qs C: I had read somewhere that the browser drivers also act like a RESTful service. Is this true?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source