RSelenium不能与Firefox一起工作

RSelenium不能与Firefox一起工作

本文介绍了RSelenium不能与Firefox一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我的问题类似于,但他试图使用Chrome我试图使用Firefox(47.0.1)。
$ b $基本上,我试图使用RSelenium。这是我的代码:

 >库(RSelenium)
> checkForServer()

> startServer()
> mybrowser< - remoteDriver()
> mybrowser $ open()

最后一行显示以下错误。

  [1]连接到远程服务器
错误:摘要:UnknownError
详细信息:处理命令时发生服务器端错误。
class:org.openqa.selenium.WebDriverException

我尝试删除 - 重新安装 RSelenium 包。我也尝试了推荐,没有结果。



提前致谢




编辑1:

 > sessionInfo()
R版本3.2.3(2015-12-10)
平台:x86_64-w64-mingw32 / x64(64位)
运行于:Windows> = 8 x64 (build 9200)

locale:
[1] LC_COLLATE = French_France.1252 LC_CTYPE = French_France.1252 LC_MONETARY = French_France.1252 LC_NUMERIC = C
[5] LC_TIME = French_France。 1252

附加软件包:
[1] stats graphics grDevices utils datasets method base

其他附加软件包:
[1] RSelenium_1.3.5 RJSONIO_1 .3-0 RCurl_1.95-4.8 bitops_1.0-6 foreach_1.4.3 httr_1.2.0 XML_3.98-1.4

通过命名空间加载(而不是附加):
[1] R6_2.1.2 tools_3.2.3 codetools_0.2-14 iterators_1.0.8 caTools_1.17.1


解决方案你可以尝试从github安装:

$ $ $ $ $ $ $ $ $ $ devtools :: install_github(ropensci / RSelenium)

然后运行

<$ p $ RSElenium :: checkForServer(update = TRUE)

然后重试。 Selenium最近在下载树上放了一个Selenium 3.0的测试版本,这个版本下载不了了,请参阅。我会考虑将一个新的版本更新到CRAN,一旦一些额外的修正已经被合并。

更新:



现在有一个新版本的 RSelenium

  install。包(RSelenium)
库(RSelenium)
checkForServer(update = TRUE)
$ b $ selServ< - startServer()
mybrowser< - remoteDriver
mybrowser $ open()
mybrowser $ navigate(http://www.google.com)
mybrowser $ close()
selServ $ stop()


I know my question is similar to this one, but he's trying to use Chrome while I'm trying to use Firefox (47.0.1).

So basically, I'm trying to use RSelenium. Here is my code :

> library(RSelenium)
> checkForServer()

> startServer()
> mybrowser <- remoteDriver()
> mybrowser$open()

And with that last line, I get the following error.

[1] "Connecting to remote server"
Error:   Summary: UnknownError
         Detail: An unknown server-side error occurred while processing the command.
         class: org.openqa.selenium.WebDriverException

I tried removing-reinstalling the RSelenium package. I also tried what this answer recommends, with no result.

Thanks in advance.


Edit 1 :

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RSelenium_1.3.5 RJSONIO_1.3-0   RCurl_1.95-4.8  bitops_1.0-6    foreach_1.4.3   httr_1.2.0      XML_3.98-1.4

loaded via a namespace (and not attached):
[1] R6_2.1.2         tools_3.2.3      codetools_0.2-14 iterators_1.0.8  caTools_1.17.1
解决方案

Can you try installing from github:

devtools::install_github("ropensci/RSelenium")

Then run

RSelenium::checkForServer(update = TRUE)

then retry. Selenium recently put a beta version of Selenium 3.0 on the download tree which was unaccounted for see https://github.com/ropensci/RSelenium/issues/79. I will look to update a new version to CRAN once some additional fixes have been incorporated.

UPDATE:

There is a new version of RSelenium on CRAN now.

install.packages("RSelenium")
library(RSelenium)
checkForServer(update = TRUE)

selServ <- startServer()
mybrowser <- remoteDriver()
mybrowser$open()
mybrowser$navigate("http://www.google.com")
mybrowser$close()
selServ$stop()

这篇关于RSelenium不能与Firefox一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 14:26