RSelenium
RSelenium copied to clipboard
Selenium no longer works in R
Good evening, I write this question because I have a problem with my Rselenium. I use selenium with R every day, but since yesterday it has stopped working. My code is:
library(RSelenium)
driver <- rsDriver(remoteServerAddr = "localhost", port=4445L, browser=c("firefox"), version = "latest")
The error message is:
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking geckodriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking phantomjs versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
[1] "Connecting to remote server"
Selenium message:Unable to create session from {
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"nativeEvents": true,
"version": "",
"platform": "ANY"
},
"capabilities": {
"firstMatch": [
{
"browserName": "firefox"
}
]
}
}
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'PC3', ip: '192.168.1.151', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_221'
Driver info: driver.version: unknown
Could not open firefox browser.
Client error message:
Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
Check server log for further details.
The real problem is that before yestarday the script worked.
The versions about the tools are:
Java is 1.8.0_221-b11
RStudio is 1.2.1335
Firefox is 69.0(64bit)
Windows 10 Pro 64bit
I didn't change my code. I don't know what happened?
Thank you so much in advance for any tipy of help.
Francesco
Does it work for you with
library(RSelenium)
rmDr <- remoteDriver(remoteServerAddr = "localhost", port=4445L, browserName = "firefox")
rmDr$open()
? Are you using a Docker Selenium standalone-firefox?
Thank you for your answer. Yes, I tried and used in my script the code that you wrote, but it didn't work. I tried to change the version of firefox, but nothing.
In the end I solved the problem through the package Reticulate with python.
I think that this problem, maybe, is windows update's fault (but is just my thinking, I don't have the proves).
I echo the documentation suggestion to have the remote server as a Docker standalone which should eliminate all the architecture/OS/version infrastructure issues.
Okay, thank you. I will do and I will post here the results ( I hope soon!)