I'm trying to learn how to use the RSelenium
package, but I haven't even been able to connect to a server yet. My code is as simple as:
library(RSelenium)
rs_driver <- rsDriver()
rs_driver
The error message I get is:
[1] "Connecting to remote server"
Could not open chrome browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 4567: Connection refused
Check server log for further details.
$client
[1] "No sessionInfo. Client browser is mostly likely not opened."
$server
PROCESS 'file413018516402.bat', finished.
Warning message:
In rsDriver() : Could not determine server status.
I already tried:
- Updating Java, Chrome, RStudio, and both
netstat
andRSelenium
. - Several different specifications for
rsDriver()
arguments, varying:- The
browser
. For Chrome, I also tried different versions, varyingchromever
. - Setting
port
manually, or by usingfree_port()
fromnetstat
.
- The
- Turning off the Windows Defender Firewall for RStudio (though I'm not completely sure if that's necessary and if I did this properly).
Despite having come across some related questions (as listed below), either they remain unsolved or the suggested solutions weren't successfully implemented by me.
- RSelenium browser not opening
- Can't use RSelenium package, function rsDriver() says can't connect to browser
- RSelenium won't connect to remote server
I'd really appreciate any help :)