📜  添加下载目录 selenium python 代码示例

📅  最后修改于: 2022-03-11 14:46:49.205000             🧑  作者: Mango

代码示例1
chromeOptions = webdriver.ChromeOptions()
prefs = {"download.default_directory" : "/some/path"}
chromeOptions.add_experimental_option("prefs",prefs)
chromedriver = "path/to/chromedriver.exe"
driver = webdriver.Chrome(executable_path=chromedriver, chrome_options=chromeOptions)