WebDriver和DevTool协议有什么区别 [英] What is the difference between WebDriver and DevTool protocol
问题描述
众所周知,WebDriver协议是为自动化测试目的而设计的.但是主要的浏览器也提供DevTool协议.在某些情况下,与WebDriver相比,DevTool协议可以实现更强大的交互和操作.
As we known WebDriver protocol is design for automation test purpose. But the major browsers also provide DevTool protocol. In some cases the DevTool protocol could achieve more powerful interactions and operations compare to WebDriver.
我的问题是为什么会有两种不同的协议,这两种协议之间的主要区别是什么?是否有任何可供选择的经验可以分享给项目开发人员?
My question is why there are two different protocols and what's the main difference between these two protocols? Is there any selection experience available to share for a project development?
提前谢谢!
参考:
-
DevTools
DevTools
- https://docs.microsoft.com/zh-CN/microsoft-edge/devtools-protocol/
- https://chromedevtools.github.io/devtools-protocol/
- https://searchfox.org/mozillacentral/source/devtools/docs/backend/protocol.md
- https://docs.microsoft.com/en-us/microsoft-edge/devtools-protocol/
- https://chromedevtools.github.io/devtools-protocol/
- https://searchfox.org/mozillacentral/source/devtools/docs/backend/protocol.md
WebDriver:
WebDriver:
- https://www.seleniumhq.org/projects/webdriver/
- https://www.w3.org/TR/webdriver1/
- https://docs.microsoft.com/en-us/microsoft-边缘/网络驱动程序
- https://developer.mozilla.org/zh-美国/docs/Mozilla/QA/Marionette/WebDriver
- https://sites.google.com/a/chromium.org/chromedriver/下载
- https://www.seleniumhq.org/projects/webdriver/
- https://www.w3.org/TR/webdriver1/
- https://docs.microsoft.com/en-us/microsoft-edge/webdriver
- https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver
- https://sites.google.com/a/chromium.org/chromedriver/downloads
推荐答案
WebDriver
WebDriver为我们提供了精心设计的面向对象的API,可以为通过动态网页创建的现代高级Web应用程序提供更好的支持.简而言之,WebDriver是使我们能够自省和控制用户代理的远程控制界面.它为我们提供了一个平台和语言中立的有线协议,以及一种进程外程序远程指示 Web浏览器行为的方式.
WebDriver
WebDriver supplies us a well-designed object-oriented API that can provide improved support for modern advanced web-applications created through dynamic web pages. In short, WebDriver is the remote control interface that enables us to introspect and control the user agents. It provides us a platform and language neutral wire protocol along with as a way for out-of-process programs to remotely instruct the behavior of Web Browsers.
WebDriver规范 由浏览器测试和工具工作组作为编辑草稿.编辑草稿并不意味着得到W3C成员的认可,并且可以随时被其他文档更新,替换或淘汰.
The WebDriver Specification was published by the Browser Testing and Tools Working Group as Editor's Draft. Editor's Draft does not imply endorsement by the W3C Membership and may be updated, replaced or obsoleted by other documents at any time.
开发人员工具协议 被各种浏览器, JavaScript引擎和调试工具可以:
- 使用一组可在各种目标上正常运行的诊断工具来帮助Web开发人员.
- 为了满足对特定于目标的 devtools协议适配器的需求,并简化工具用户和工具开发人员的使用体验.
- 提供与供应商无关的平台,以促进不同协议实现与感兴趣的客户之间的协作和相互共识的建立.
- 减少根据用户案例构建任何进一步兼容协议实现所必需的工程投资.
- Help web developers with a set of diagnostics tools which work well across a variety of targets.
- To converge the need for target-specific devtools protocol adapters and simplify the experience for tool users and tool developers.
- Provide a vendor-neutral platform to facilitate collaboration and mutual consensus building between different protocol implementations and interested clients.
- Reduce the engineering investment necessary to build any further compatible protocol implementations as per user stories.
一些具有内置调试协议的 Browser Engines 和 Browsers 是:
Some of the Browser Engines and Browsers those have a built-in debugging protocol are:
- Chrome开发工具
- WebKit/Safari
- Node.js
- Firefox 1 (
- Chrome DevTools
- WebKit / Safari
- Node.js
- Firefox 1 (in development)
- Edge 2 ([in development] (link will be updated soon))
一些公开通用协议的适配器:
Some of the adapters that exposes a common protocol:
- Microsoft Edge诊断适配器 -将被替换(如上所述).
- RemoteDebug iOS WebKit适配器
在这里您可以在> RemoteDebug - Protocol Adaptors
1.请注意, Firefox 的DevTools Protocol
是正在进行的工作
2.请注意, Edge 的DevTools Protocol
是正在进行的工作
这篇关于WebDriver和DevTool协议有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!