diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Capabilities/Extra.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Capabilities/Extra.hs index 0fbe4266..835f765b 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Capabilities/Extra.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Capabilities/Extra.hs @@ -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 diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/StartWebDriver.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/StartWebDriver.hs index 923334bc..3a3caeb6 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/StartWebDriver.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/StartWebDriver.hs @@ -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