Skip to content

Commit

Permalink
sandwich-webdriver: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jan 17, 2025
1 parent cea5807 commit 63141c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ configureDownloadCapabilities downloadDir caps@(W.Capabilities {W.browser=browse

options = HM.insert "prefs" (A.Object prefs) chromeExperimentalOptions

downloadPrefs = [("profile.default_content_setting_values.automatic_downloads", A.Number 1)
, ("profile.content_settings.exceptions.automatic_downloads.*.setting", A.Number 1)
, ("download.prompt_for_download", A.Bool False)
, ("download.directory_upgrade", A.Bool True)
, ("download.default_directory", A.String (T.pack downloadDir))]
downloadPrefs = [
("profile.default_content_setting_values.automatic_downloads", A.Number 1)
, ("profile.content_settings.exceptions.automatic_downloads.*.setting", A.Number 1)
, ("download.prompt_for_download", A.Bool False)
, ("download.directory_upgrade", A.Bool True)
, ("download.default_directory", A.String (T.pack downloadDir))
]
configureDownloadCapabilities _ browser = return browser
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ startWebDriver wdOptions@(WdOptions {capabilities=capabilities'', ..}) (OnDemand

-- Final extra capabilities configuration
capabilities <-
configureHeadlessCapabilities wdOptions runMode capabilities'
pure capabilities'
>>= configureHeadlessCapabilities wdOptions runMode
>>= configureDownloadCapabilities downloadDir

-- Make the WebDriver
Expand Down

0 comments on commit 63141c7

Please sign in to comment.