R - Rselenium - setImplicitWaitTimeout在Selenium Server 3.5.3中出错

时间:2017-09-16 13:11:51

标签: r selenium selenium-webdriver rselenium

使用Selenium Server 3.4.0和Gecko Driver v0.18时,此Rselenium命令可以正常工作。

remDr$setImplicitWaitTimeout(milliseconds = 15000)      

这是相关的代码块:

remDr <- remoteDriver()
remDr$open(silent = TRUE)   
remDr$setImplicitWaitTimeout(milliseconds = 15000)       

但是当使用Gecko v0.18或v0.19运行Selenium Server 3.5.3时,相同的代码会生成此错误:

Selenium message:POST /session/91a1f43f-18b3-4e11-92a9-d738cd4049a4/timeouts/implicit_wait did not match a known command
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: 'pc', ip: 'xxx.xxx.x.x', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144'
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.
 class: org.openqa.selenium.UnsupportedCommandException
 Further Details: run errorDetails method

Firefox:55.0.3(64位)

我已经在Rselenium Github回购中查找了软件包更新,并搜索了其他信息。

不确定我是否遗漏了某些内容或应该报告错误。

2 个答案:

答案 0 :(得分:1)

隐式等待的实现现在略有不同。尝试

remDr <- remoteDriver()
remDr$open()
remDr$setTimeout(type = "implicit", milliseconds = 5000)

您可能还希望设置页面加载超时

remDr$setTimeout(type = "page load", milliseconds = 5000)

答案 1 :(得分:0)

SetTimeouts命令映射到Marionette setTimeouts命令,这使得geckodriver与Firefox 56及更高版本兼容。

来自他们在github上的发布信息。你应该使用firefox 56或更高版本而不是55。

here是链接。