Agenda for this blog: To discuss about the architecture of WebDriver and its functionality and approach that it follows to interact with WebElements.
WebDriver Architecture:
WebDriver itself is an interface and the Selenium WebDriver API communicates between the written script/commands using the respective language bindings and the Browser engine to automate the Application,It uses a protocol called JSON wire Protocol and referred as WebDriver Protocol,Please find the image for the basic architecture of the WebDriver:
Internal Flows of
WebDriver functionality and how it
interacts with WebElements:
Selenium-WebDriver makes direct calls
to the browser using each browser’s native support for automation and its
JS-Engine. How these direct calls are made, and the features they support
depends on the browser you are using.
It does not inject Javascript like Selenium-RC
at the time of loading the browser.
The following incidents are occurred
while execution of the Webdriver script:
1. Basically we write the script using
any language binding (Java/C# etc) and it hits the WebDriver API.
2. The script/commands (ex :
driver.findElement(By.Id(“xyz”))) gets
converted into Javascript.
3. By the help of Browser Engine it
again gets converted into the JSon, which is kind of key-value pair .
4. After getting the respective value
for the respective key it identifies the respective WebElements and performs
the respective user actions(like click,sendkeys etc etc..).
5. All the communications are happened
by using a protocol call JSon-Wire Protocol, which is also called WebDriver
protocol.
Find the below image for the communication that occurs between Script and WebElements:
Visit for More Automation Related Discussion:






