Download file at custom path using Selenium WebDriver

后端 未结 2 1921
日久生厌
日久生厌 2020-12-09 23:00

I am new to selenium and i would like to download file with selenium chrome web driver in specific custom folder. In default the file is downloading in browser specified dow

2条回答
  •  无人及你
    2020-12-09 23:15

    Hope it will be help for you!!

    var chromeOptions = new ChromeOptions();
     chromeOptions.AddUserProfilePreference("download.default_directory", "Your_Path");
     chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl");
     chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");
    var driver = new ChromeDriver("Driver_Path", chromeOptions);
    

提交回复
热议问题