CARE
CARE

Reputation: 628

How WebDriver, ChromeDriver and Browser communicates between them? What is a WIRE protocol?

I have created a selenium script that perfectly runs in Chrome browser. To make it run, I have gone through some previous answers and downloaded the "ChromeDriver.exe" file and added the path in the code and it works fine but my question is why we have to download this exe and what it does?

I have browsed some articles over the internet and it is not clear to me. Articles says that ChromeDriver is an implementation of "Wire Protocol" and Webdriver talks to ChromeDriver when script is executed. If it is the case what it is doing?

Can some experts throw some pointers to get better clarity on this?

Upvotes: 4

Views: 523

Answers (1)

Gab是好人
Gab是好人

Reputation: 2136

The ChromeDriver documentation's "getting start" gives you a clear answer.

ChromeDriver is a separate executable that WebDriver uses to control Chrome. It is maintained by the Chromium team with help from WebDriver contributors. [...] The ChromeDriver class starts the ChromeDriver server process at creation and terminates it when quit is called. [...]

See this answer from the Chrome Driver users group which includes a high level description of how chromedriver.exe communicates with the Chrome browser.

[...] ChromeDriver implements the WebDriver protocol, which is a REST-like interface [...]. WebDriver clients communicate with ChromeDriver by sending HTTP requests. ChromeDriver then communicates with the browser through the DevTools remote debugging interface, which is a WebSockets interface [...].

Upvotes: 1

Related Questions