Search code examples
rrselenium

How to use Google Chrome Beta with RSelenium


According to this answer https://stackoverflow.com/a/72793082/2554330, there are some bugs in the latest version of chromedriver that have been fixed in the version that works with Google Chrome Beta, so I'd like to try the beta.

This answer https://stackoverflow.com/a/65975577/2554330 shows how to run Google Chrome Beta from Javascript. I'd like to do the same from RSelenium, but I can't spot an equivalent of chrome_options.binary_location.

How do I specify the Chrome location when using RSelenium?


Solution

  • Try following codes:

    cPath <- "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
    ecap <- list(chromeOptions = list("binary" = cPath))
    remDr <- remoteDriver(browserName = "chrome", extraCapabilities = ecap)
    remDr$open()
    

    Note that startServer() func is now defunct.

    These were obtained from this comment by the author of RSelenium.