I am trying to use RSelenium with Opera (Version 72). I already downloaded the current version of the opera drivers from https://github.com/operasoftware/operachromiumdriver/releases.
However, I am facing two problems which I did not figure out yet.
What`s the procedure for installing the opera drivers? I ran the .exe, but only some lines in the win console appeared.
What is the right code? My latest try is:
remDr = remoteDriver(remoteServerAddr = "localhost", port = 4444, browserName = "opera",extraCapabilities = list("opera.binary" = "C:[..]/operadriver.exe"))
(I also tried remDr = remoteDriver([...] /launch.exe"))
remDr$open()
In doing this, I got the response:
"Undefined error in httr call. httr output: Failed to connect to localhost port 4444: Connection refused"
Thanks for any suggestions.
I found a work-around that works.
I first called:
selCommand=wdman::selenium(jvmargs = c("Dwebdriver.chrome.verboseLogging=true"), retcommand = TRUE)
cat(selCommand)
This gave me the path of the chromedriver.exe used by rsDriver (in my case C:\Users\User\AppData\Local\binman\binman_chromedriver\win32\87.0.4280.20\chromedriver.exe). Next, I downloaded the operadriver.exe from https://github.com/operasoftware/operachromiumdriver/releas and copied it into this folder. Afterwards, I deleted the original chromedriver.exe and renamed the operadriver.exe into chromedriver.exe. Then I called:
rD=rsDriver(browser = c("chrome"))
remDr=remoteDriver(remoteServerAddr = "localhost", port = 4567L, browserName = "chrome")
remDr=rD$client
And it indeed it works as expected! Does someone has a more convenient method?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With