6
セレンを初めて使用しました。どうすればよいですか?は、オペレーティングシステムでブラウザのダウンロードフォルダの既定のパス(Chromeを使用しています)を取得します。 。これを達成するSelenium WebDriverを使用して既定のダウンロードフォルダパスを取得する
var chromeOptions = new ChromeOptions();
chromeOptions.AddUserProfilePreference("download.default_directory", path);
chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl");
chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");
var driver = new ChromeDriver("Driver_Path", chromeOptions);
こんにちは、私は知っているこの質問をしたい場合がありますが、私は知っているが、Pythonについては、最初のもの、C#の答えがあります:http://stackoverflow.com/questions/16328801/define-download-directory-for-chromedriver -selenium-with-python –
@IvanRasconしかし、彼は**ダウンロードパスを定義しているようです**現在のデフォルトのダウンロードパスを取得するだけです – GroundIns
@GroundInsはChromeのブラウザのダウンロードディレクトリを取得できましたか? – sjethvani