Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 years ago .It would really help if someone can explain these to me in details. I want to make a community wiki regarding internal working of WebDriver to hopefully help anyone searching for this topic. Thanks in advance!
Abhijeet Vaikar asked Apr 15, 2014 at 5:02 Abhijeet Vaikar Abhijeet Vaikar 1,608 6 6 gold badges 28 28 silver badges 51 51 bronze badges What do you mean by point 3, "how is the DOM accessed?" Commented Apr 15, 2014 at 8:25For example, when I execute document.getElementById() returns a javascript object which represents an element on the DOM. Does it work similarly with all webdriver binding apis? Does webelement contain reference to an element on the DOM?
Commented Apr 15, 2014 at 8:58Folks voting for closing this question - I would like to know why the question is getting voted for close?? Any valid reasons?
Commented Apr 16, 2014 at 8:18All implementations of WebDriver that communicate with the browser, or a RemoteWebDriver server use a common wire protocol. This wire protocol defines a RESTful web service using JSON over HTTP.
So each WebDriver command is mapped to an HTTP method via the WebDriver service, and then passed on to the HTTP Command Processor to communicate with the browser. The Command responses are returned as HTTP/1.1 response messages via the WebDriver service.
Different drivers, such as the Firefox Driver and the IE Driver, have different implementations to accomplish the above.
The Selenium WebDriver architecture document linked below goes into further details on how these are implemented and how WebDrvier commands flow through to the browser and back. Read section 16.6 for details on the Firefox Driver.
The Architecture of Open Source Applications - Selenium WebDriver
by Simon Stewart (creator of WebDriver, and core contributor to the Selenium project)
Also, details on the The WebDriver Wire Protocol will be helpful in understanding how the HTTP methods are mapped.