Reputation: 151
I try to install and run a simple example for R Selenium package using this:
install.packages("RSelenium")
library("RSelenium")
startServer()
checkForServer()
startServer()
remDr <- remoteDriver(browserName = "Chrome")
remDr$open()
In the last code I receive this:
[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 some workarounds from google but nothing worked. What can I do?
Upvotes: 4
Views: 4072
Reputation: 1360
From comments:
Click start
Select Control Panel
> System
Select Advance system settings
Click Environment Variables...
Under System Variables
Scroll to Path
and double click
At the end of Variable value:
add ;C:\path\to\directory
that holds the chromedriver.exe file. Note the ;
that separates the paths
Restart your R session and you should now be able to run:
> require(RSelenium)
RSelenium::startServer()
remDr <- remoteDriver(browserName = "chrome")
remDr$open()
EDIT
For RSelenium to operate with chrome you first need to download chromedriver.exe
you can download this from https://sites.google.com/a/chromium.org/chromedriver/downloads
. Once downloaded unzip the folder and place chromedriver.exe where you would like to store it.
The directory that you store chromedriver.exe
and add to your system PATH can be anywhere you choose. As stated in comments, for example, mine currently resides in C:\Python27\Scripts
.
Upvotes: 3