How to download a HTML webpage using Selenium with python?
问题 I want to download a webpage using selenium with python. using the following code: from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys chromeOptions = webdriver.ChromeOptions() chromeOptions.add_argument('--save-page-as-mhtml') d = DesiredCapabilities.CHROME driver = webdriver.Chrome() driver.get("http://www.yahoo.com") saveas = ActionChains(driver).key_down(Keys.CONTROL)\ .key_down('s').key_up(Keys