Using Selenium Webdrivers method “browser.helperApps.neverAsk.saveToDisk” how can i download a file automatically on click of a link

前端 未结 4 736
暖寄归人
暖寄归人 2020-12-03 04:31

Using Selenium Web-driver in Java, am trying to download a file on click of a link in an Application.

i.e. On click of a Link the download should begin without askin

4条回答
  •  甜味超标
    2020-12-03 05:13

    Set the following preferences:

    profile.setPreference("browser.helperApps.alwaysAsk.force", false);
    profile.setPreference("browser.download.manager.showWhenStarting",false);
    

提交回复
热议问题