RSelenium behind proxy

前端 未结 2 595
遇见更好的自我
遇见更好的自我 2020-12-30 15:29

I am trying to use RSelenium. Here is what I am doing:

library(RSelenium)  
driver<- rsDriver(browser=c(\"chrome\"))
remDr <- driver[[\"client\"]]
remD         


        
2条回答
  •  [愿得一人]
    2020-12-30 16:05

    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

提交回复
热议问题