Prompt_for_download is still appearing after setting false in prefs

后端 未结 1 2014
抹茶落季
抹茶落季 2021-01-06 02:34

I have this below config and already set prompt_for_download to false but for some reason, when I run the test, prompt for download dialogue is keep appearing. Am I doing so

1条回答
  •  隐瞒了意图╮
    2021-01-06 02:54

    I think you also need to add directory_upgrade:

    prefs: {
        download: {
            prompt_for_download: false, 
            directory_upgrade: true,
            default_directory: '/tmp/downloads'
        },
    },
    

    Aside from that, make sure /tmp/downloads directory exists and there are permissions to write into it. Also see a similar issue:

    • Setting chromedriver preferences on protractor tests

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