我的 Chrome 版本最近更新到了 76.0.3809.100。更新 ChromeDriver 后,我注意到 RSelenium 命令...$sendKeysToActiveElement()
功能停止工作。
> remoteDriver$sendKeysToActiveElement( list(key = 'page_down' ) )
Selenium message:sendKeysToActiveElement
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'DESKTOP-xxxxx', ip: '192.xxx.x.xx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: 'x.x.x_xxx'
Driver info: driver.version: unknown
Error: Summary: UnknownCommand
Detail: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
Further Details: run errorDetails method
我重新安装了 Chrome 和 ChromeDriver 74,命令又能正常工作了。我想知道开发人员是否知道这一点(我还没有找到错误报告页面)以及是否有可用的修复或解决方法?
答案1
我找到了一个解决方法
webElem <- remoteDriver$findElement("css", "body")
webElem$sendKeysToElement( list(key = 'page_down' ) )
看来使用主体作为元素并向其发送关键输入仍然有效。