我已经在集群Kubernetes上使用了硒集线器作为服务,并且我开始使用硒侧流道进行远程测试。不幸的是,当我尝试使用终端(使用Ubuntu)运行测试时,出现以下错误:
UnsupportedOperationError:相对于视口的指针移动为 桥接模式不支持
在executeLegacy(../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17) 在Actions.perform (../../../../../ usr / lib / node_modules / selenium-side-runner / node_modules / selenium-webdriver / lib / input.js:971:16
如果我尝试从硒开始进行测试,那么一切都会很好。错误可能取决于什么?
你能帮我吗?预先谢谢你。
最诚挚的问候
答案 0 :(得分:0)
此错误消息...
UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode
at executeLegacy (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17)
at Actions.perform (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:971:16
...表示在桥模式下在画布中工作时,不支持相对于视口发生的指针移动。
根据Class Actions的第6条中的文档:
对于W3C动作,相对于WebElement的移动偏移量将相对于元素在视口中的第一个client rect的中心进行解释。对于旧操作,元素偏移量相对于元素bounding client rect的左上角。在桥接模式下将动作转换为传统协议时,必须插入一个额外的命令,以将移动偏移量从一个参考系转换到另一个参考系。此额外命令可解决整体延迟问题。
您可以在Is it possible to programmatically determine whether W3C action commands are used?
中找到详细的讨论这是Selenium的一个已知问题,正在通过Not correctly move pointer to the position inside of element in bridge mode.进行跟踪
当前发布的 ChromeDriver 76.0.3809.12 包含Actions API的实现。
----------ChromeDriver 76.0.3809.12 (2019-06-07)----------
Supports Chrome version 76
Resolved issue 1897: Implement Actions API [Pri-1]
链接到Issue 1897: Implement Actions API
切换到 ChromeDriver 76.0 将解决您的问题。
答案 1 :(得分:0)
可能是由于硒版本。我遇到了同样的问题,并将硒版本升级到了4.0.X。