RSelenium is not working

I am trying to install and run a simple example for the Selenium R package using this:

install.packages("RSelenium")
library("RSelenium")
startServer()
checkForServer()
startServer()
remDr <- remoteDriver(browserName = "Chrome")
remDr$open()

In the last code, I get the following:

[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?

+4
source share
1 answer

From the comments:

Press start
Select Control Panel> System
Select Advance system settings
PressEnvironment Variables...

In System Variables
Scroll to Pathand double-click the Variable value:Add icon at the end ;C:\path\to\directory, which contains the chromedriver.exe file. Pay attention to ;which shares the paths

Restart the R session, and now you can start:

> require(RSelenium)
  RSelenium::startServer()
  remDr <- remoteDriver(browserName = "chrome")
  remDr$open()

EDIT

RSelenium chromedriver.exe, https://sites.google.com/a/chromium.org/chromedriver/downloads. chromedriver.exe, .

, chromedriver.exe PATH, . , , C:\Python27\Scripts.

+3

Source: https://habr.com/ru/post/1611593/


All Articles