本文介绍了根据selenium webdriver,浏览器的本机支持是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在学习硒的同时,我知道:

While learning about selenium, I came to know that:

我想知道,这是什么本机支持?是某些HTML代码"还是"javascript代码"?

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

是否有任何良好的Web链接,我可以在其中知道使用哪种语言或脚本编写浏览器?

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

推荐答案

您的语言绑定代码(例如Java)实现了WebDriver接口,该接口通过HTTP命令与不同的浏览器驱动程序进行通信.这些驱动程序与浏览器进行本机通信(不是http/JS注入/OS包装).

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.

顺便说一下,这是Selenium 2和Selenium 3之间的主要区别.在Selenium 2中,为每个浏览器提供驱动程序是Selenium项目的责任,在Selenium 3中,所有主要的浏览器供应商都提供了自己的WebDriver实现,并且因为他们最了解自己的浏览器,所以它更加稳定和健壮.

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!

例如 Chrome 驱动程序.通信通过特殊的自动化代理模块完成:

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

Internet Explorer 中,它是使用通信API 完成的:

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

希望有帮助.

这篇关于根据selenium webdriver,浏览器的本机支持是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 20:41