【问题标题】:What is mean by webdriver W3C protocol. How it is different from JSon protocolwebdriver W3C 协议是什么意思。它与 JSON 协议有何不同
【发布时间】:2019-05-08 02:18:26
【问题描述】:

什么是 W3c Web 驱动程序协议。它与 Json 有线协议有何不同。为什么 selenium 从 Json 有线协议改为 W3c Web 驱动协议

【问题讨论】:

标签: selenium webdriver


【解决方案1】:

差异已在this answer中详细说明。

以下是更改的命名约定:

**JSON Wire Protocol**      **WebDriver Wire Protocol**
version                     browserVersion
platform                    platformName
noProxy                     noproxy
UnknownCommand              unknown command
NoSuchFrame                 no such frame
NoSuchElement               no such element
StaleElementReference       stale element reference
ElementIsNotSelectable      element not selectable
JavaScriptError             javascript error
Timeout                     timeout
NoSuchWindow                no such window
InvalidCookieDomain         invalid cookie domain
ScriptTimeout               script timeout
SessionNotCreatedException  session not created
MoveTargetOutOfBounds       move target out of bounds
NoAlertOpenError            no such alert
InvalidElementCoordinates   invalid coordinates
stackTrace                  stacktrace

错误代码和数据结构也发生了变化。查看参考资料 了解实现细节。

another question 中详细介绍了这两个 API 的版本历史。

References Relationships between different versions of Selenium - Yi Zeng

Selenium Changelog

Selenium Issue #3551: Wire Protocol Documentation Issues

W3C Living Document: WebDriver Protocol

Selenium Wiki: JSON Wire Protocol

【讨论】:

  • 如果您知道该问题已被回答,最好将该问题标记为重复。在此处发布答案只会复制同一问题的两个副本。
猜你喜欢
  • 2016-12-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-28
  • 2014-10-15
  • 2017-12-29
  • 2016-12-19
  • 2011-04-28
相关资源
最近更新 更多