【发布时间】:2019-05-08 02:18:26
【问题描述】:
什么是 W3c Web 驱动程序协议。它与 Json 有线协议有何不同。为什么 selenium 从 Json 有线协议改为 W3c Web 驱动协议
【问题讨论】:
什么是 W3c Web 驱动程序协议。它与 Json 有线协议有何不同。为什么 selenium 从 Json 有线协议改为 W3c Web 驱动协议
【问题讨论】:
差异已在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 Issue #3551: Wire Protocol Documentation Issues
【讨论】: