What is the mechinism used for commiunication between webdriver and browser

我的未来我决定 提交于 2019-12-06 02:54:13

The communication between webdriver and browser happens through a json-wire protocol which is specified in the W3C documentation. All browsers that webdriver supports, uses this same protocol.

How does webdriver read and identify elements in a page? This varies from browser to browser.

Firefox - webdriver gets installed as a plugin in your browser while running the test. The webdriver server will send the json-commands to this plugin and those commands will get executed in the browser. The plugin is built within the webdriver jar file. It will get installed while running the test.

Chrome - For testing chrome, you would also need a chromedriver.exe file. This chromedriver.exe acts similar to the firefox plugin. It can receive the commands from webdriver server and execute it on the browser

IE - Similar to Chrome, IE executes with the help of InternetExplorerDriver.exe.

You can understand more about the functioning by looking at the different DriverFile source code in github.

You can also get an understanding about the working from here - http://www.aosabook.org/en/selenium.html. I am not sure how updated this page is, but should help to understand the concept.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!