使用带有phantomjs的RSelenium时,remDr $ open()出现意外错误

时间:2015-04-11 15:25:59

标签: r phantomjs rselenium

我正在使用以下代码

remDr <- remoteDriver(browserName = "phantomjs")
URL <-"http://www.soccer24.com/kosovo/superliga/results/#"
remDr$open()

我收到以下错误:

Error:   Summary: UnknownError
     Detail: An unknown server-side error occurred while processing the command.
     class: java.lang.IllegalStateException

我不知道为什么会收到错误?

我的sessionInfo()结果如下:

R version 3.0.3 (2014-03-06)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] R Selenium_1.3.5 RJSONIO_1.3-0 XML_3.98-1.1 RCurl_1.95-4.5 bitops_1.0-6   

loaded via a namespace (and not attached):
[1] caTools_1.17.1 tools_3.0.3

下面提供了我的java版本供您参考:

system("java -version")
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)

1 个答案:

答案 0 :(得分:1)

看起来你现在没有路径上的phantomjs.exe。更多细节可以在RSelenium&#34; Saucelabs&#34;小插曲http://cran.r-project.org/web/packages/RSelenium/vignettes/RSelenium-saucelabs.html#id2a

所以从这里下载phantomjs:http://phantomjs.org/download.html并将exe放在你的路径中。