selenium is down operation

  selenium is down operation, file downloads:

Import Selenium
 Import selenium.webdriver
 Import Time
 Import OS 

Options = selenium.webdriver.ChromeOptions ()
 # download.default_directory configuration directory; The os.getcwd () fetches the current directory 
Prefs = { " profile.default_content_setting.popups " : 0,   # downloads not prompt 
       " download.default_directory " : The os.getcwd ()}   # download path may enter their path back 
options.add_experimental_option ( " Prefs " , Prefs) 
Driver = selenium.webdriver.Chrome () 
driver.get ( "https://pypi.org/project/selenium/ " ) 
driver.find_element_by_partial_link_text (
" tar.gz " ) .click () # Find text download button and click

 

Guess you like

Origin www.cnblogs.com/my-global/p/12467673.html