Arguments and preferences to pass to chrome driver
chrome_options( cargs = c("--disable-gpu", "--window-size=1280,800"), headless = TRUE, ..., download_path = tempdir() ) firefox_options( cargs = c("--width=1280", "--height=800", "--memory 1024mb"), headless = TRUE, ..., download_path = tempdir() )
cargs | character arguments to pass to driver. |
---|---|
headless | logical, is the driver run in headless state. Default: TRUE |
... | additional preferences to add to driver. |
download_path | character, Path to save files to. Default: tempdir() |
list
By default the preferences are set to allow for local dowloading to a user defined path.
chrome:
"profile.default_content_settings.popups" = 0L
download.prompt_for_download" = FALSE
download.directory_upgrade" = TRUE
safebrowsing.enabled" = TRUE
download.default_directory" = download_path
firefox:
'browser.download.folderList' = 2
'browser.download.lastDir' = download_path
'browser.download.dir' = download_path
Other driver:
chrome_version()
,
firefox_driver()
,
set_chrome_driver()
,
set_firefox_driver()
,
set_timeout()
Other driver:
chrome_version()
,
firefox_driver()
,
set_chrome_driver()
,
set_firefox_driver()
,
set_timeout()
chrome_options()#> $args #> [1] "--headless" "--disable-gpu" "--window-size=1280,800" #> #> $prefs #> $prefs$profile.default_content_settings.popups #> [1] 0 #> #> $prefs$download.prompt_for_download #> [1] FALSE #> #> $prefs$download.directory_upgrade #> [1] TRUE #> #> $prefs$safebrowsing.enabled #> [1] TRUE #> #> $prefs$download.default_directory #> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpkGRxyW" #> #>firefox_options()#> $args #> [1] "--headless" "--width=1280" "--height=800" "--memory 1024mb" #> #> $prefs #> $prefs$browser.download.folderList #> [1] 2 #> #> $prefs$browser.download.lastDir #> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpkGRxyW" #> #> $prefs$browser.download.dir #> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpkGRxyW" #> #>