Setting chromedriver preferences on protractor tests

后端 未结 1 859
闹比i
闹比i 2020-12-18 02:26

Trying to find a solution to download files during my tests, i found this question that lead me to preferences file in chrome folder.

Apparently, there are no info

相关标签:
1条回答
  • 2020-12-18 02:58

    You are doing it correctly, except you need to:

    • specify an absolute path to the "downloads" directory
    • add directory_upgrade option

    Example:

    capabilities: {
            'browserName': 'chrome',
            'chromeOptions': {
    
                prefs: {
                    download: {
                        'prompt_for_download': false,
                        'directory_upgrade': true,
                        'default_directory': '/absolute/path/here'
                    }
                }
            }
        },
    

    See also: Can't stop Protractor from displaying file download prompt

    0 讨论(0)
提交回复
热议问题