Open samhatoum opened 6 years ago
Issue by rsshilli Wednesday Feb 07, 2018 at 06:16 GMT Originally opened as https://github.com/xolvio/chimp/issues/679
How do I download files using Chrome headless? I see that:
I'm having a hard time piecing together how I get this working from my Chimp world.
Versions:
I've tried a number of things playing with the configuration, trying things like this below, but nothing works:
chimpOptions.webdriverio.desiredCapabilities = { chromeOptions: { args : ["--no-sandbox", "--headless", "--disable-gpu", "--window-size=1050,900"], prefs: { "credentials_enable_service": false, "Browser.setDownloadBehavior": {behavior : "allow", downloadPath: path.join((process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE), "Downloads")}, "profile": { "password_manager_enabled": false, "default_content_setting_values": { "automatic_downloads": 1 } } } }, };
My mechanism for downloading a file is to click on the download link and then use fs to wait for the file on the file system, which never shows up :(. This worked fine before adding --headless
fs
Issue by rsshilli Wednesday Feb 07, 2018 at 06:16 GMT Originally opened as https://github.com/xolvio/chimp/issues/679
How do I download files using Chrome headless? I see that:
I'm having a hard time piecing together how I get this working from my Chimp world.
Versions:
I've tried a number of things playing with the configuration, trying things like this below, but nothing works:
My mechanism for downloading a file is to click on the download link and then use
fs
to wait for the file on the file system, which never shows up :(. This worked fine before adding --headless