Skip to content

Instantly share code, notes, and snippets.

@bedantaguru
Last active November 7, 2016 09:07
Show Gist options
  • Save bedantaguru/340faab14d61964f96ce5f650c56f008 to your computer and use it in GitHub Desktop.
Save bedantaguru/340faab14d61964f96ce5f650c56f008 to your computer and use it in GitHub Desktop.
R setup for Selenium 3 (Extra)
sel <- startServer(dir = "C:/Dev/Selenium/",
args = c("-port 4455"),
javaargs = c("-Dwebdriver.gecko.driver=\"C:/Dev/Selenium/geko/geckodriver.exe\""),
invisible = F)
firefox_profile.me <- makeFirefoxProfile(list(marionette = TRUE,
webdriver_accept_untrusted_certs = TRUE, # for sites which has expired certificates (sometimes required for internal sites)
webdriver_assume_untrusted_issuer = TRUE, # for the same reason
browser.download.dir = "C:/temp", # download directory. However it's not having any effects as of now.
network.proxy.socks = "<proxy ip>", # for proxy settings specify the proxy host IP
network.proxy.socks_port = 3128L, # proxy port. Last character "L" for specifying integer is very important and if not specified it will not have any impact
network.proxy.type = 1L)) # 1 for manual and 2 for automatic configuration script. here also "L" is important
remDr <- remoteDriver(remoteServerAddr = "localhost",
port = 4455,
browserName = "firefox",
extraCapabilities = firefox_profile.me)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment