RSelenium连接尝试产生Java错误

时间:2014-11-30 12:06:39

标签: r selenium

我很感激RSelenium的帮助(2014年11月29日下载的v.4.4)。我的第一个例子直接从线程

复制
# Get Google Chromes Inspect Element into R

library("RSelenium")
checkForServer()
startServer()
remDr <- remoteDriver(remoteServerAddr = "localhost", 
                  port = 4444, 
                  browserName = "firefox"
                  )
 remDr$open()

这导致

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

我也画了线程

# Using Phantomjs with RSelenium on Windows 7

require(RSelenium)
# devtools::install_github("ropensci/RSelenium") # the latest dev version was installed
psPath <- "C:/Users/BG/Documents/R/win-library/3.1/phantomjs/phantomjs-1.9.8-windows/phantomjs.exe"  # local location of binary
pJS <- phantom(pjs_cmd = psPath)
remDr <- remoteDriver(browserName = "phantomjs")
remDr$open()

返回

> remDr$open()
[1] "Connecting to remote server"
Error:   Summary: UnknownError
     Detail: An unknown server-side error occurred while processing the command.
     class: java.lang.NoClassDefFoundError

非常感谢任何帮助或想法。

Hi: I am appending the requested info.  In re the sync issue, as my snippet indicates I am using the most recent update from github(). Or is there something else I am missing?

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-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] RSelenium_1.3.5 XML_3.98-1.1    RJSONIO_1.3-0   RCurl_1.95-4.3  bitops_1.0-6    nlme_3.1-118   

loaded via a namespace (and not attached):
[1] caTools_1.17.1  grid_3.1.2      lattice_0.20-29 tools_3.1.2    

> system("java -version")
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)
 > 

0 个答案:

没有答案