#download related settings browser.download.folderList = 2L,
browser.download.manager.showWhenStarting = FALSE,
# put your path here but remember to give path like C:\\DirOfYourChoice and not C:\\DirOfYourChoice\\ [last \\ is not going to work]
browser.download.dir = normalizePath("TestDL"), browser.helperApps.alwaysAsk.force = FALSE,
browser.helperApps.neverAsk.openFile = paste0(known_formats, collapse = ","),
browser.helperApps.neverAsk.saveToDisk = paste0(known_formats, collapse = ","),
browser.download.manager.showWhenStarting = FALSE,
#this is for marionette and related security "browser.tabs.remote.force-enable" = TRUE, pdfjs.disabled = TRUE))
remDr <- remoteDriver(remoteServerAddr = "localhost",
port = 4444,
browserName = "firefox",
extraCapabilities = firefox_profile.me)
remDr$open()
remDr$navigate("https://www.google.com/search?q=sample+xlsx")
remDr$findElement(using = "css selector", value = ".g:nth-child(1) a")$clickElement()
remDr$navigate("https://www.google.com/search?q=test+xls")
remDr$findElement(using = "css selector", value = ".g:nth-child(1) a")$clickElement()