what is browser's native support according to selenium webdriver

青春壹個敷衍的年華 提交于 2019-12-24 04:33:11

问题


While learning about selenium, I came to know that:

Selenium Webdriver makes direct calls to the browser using each browser’s native support for automation

I want to know, What is this native support? Is it "some HTML code", or "javascript code"?

Is there any good web link, where I can know that in what language or script, browsers are written in?


回答1:


Your language-binded code (for example, Java) implements WebDriver Interface which communicates with different browser drivers via HTTP commands. Those drivers communicate natively (not http / JS injections / OS wrapping) with the browser.

By the way, here's lay the main difference between Selenium 2 and Selenium 3. in Selenium 2 it was the Selenium project responsibility to provide the driver for each browser and in Selenium 3 all the major browser vendors ship their own WebDriver implementations and because they know their browsers the best, it's much more stable and robust.

About the native implementations. Each browser native implementation is different and tightly couple to the way browser works!

For example, Chrome driver. Communication is done via special Automation Proxy module:

And in Internet Explorer, it's done using Communication APIs:

Hope it helps.




回答2:


For each and every browser some automation methods are defined by the vendors like for Chrome, Firefox they have some automation support built within them and the selenium uses the same for the test automation, in addition Selenium is the core of automation and that is why each and every browser has support for Selenium, so selenium has to just call that code and then the browser will work according to it.




回答3:


I think following link gives some insight into the question.

http://taligarsiel.com/Projects/howbrowserswork1.htm

Browser engine is the component of a browser, which parses HTML, CSS and XML.



来源:https://stackoverflow.com/questions/32087480/what-is-browsers-native-support-according-to-selenium-webdriver

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