I am trying to use RSelenium. Here is what I am doing:
library(RSelenium)
driver<- rsDriver(browser=c("chrome"))
remDr <- driver[["client"]]
remDr$open()
returns
$id
[1] NA
remDr$navigate("http://www.google.com")
(returns NULL)
remDr$getCurrentUrl()
returns empty list
I am thinking this disappointing result might be because I am behind corporate proxy.
How can I pass the http proxy to selenium browser?
Thank you
You need to use extraCapabilities
and set the proxy using the same
cprof <- list(chromeOptions =
list(args = list("--proxy-server=http://118.69.61.212:53281")))
driver<- rsDriver(browser=c("chrome"), extraCapabilities = cprof)
driver$client$navigate("http://ipinfo.io")
And you can see that chrome now uses the proxy config
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