SHARE
TWEET

Untitled

a guest Aug 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options = webdriver.ChromeOptions()
  2. options.add_argument("download.default_directory=/folder")
  3. driver = webdriver.Chrome(chrome_options=options)
  4.      
  5. import webdriver
  6. chrome_options = webdriver.ChromeOptions()
  7. prefs = {'download.default_directory' : '/folder'}
  8. chrome_options.add_experimental_option('prefs', prefs)
  9. driver = webdriver.Chrome(chrome_options=chrome_options)
  10.      
  11. from selenium import webdriver
  12. options = webdriver.ChromeOptions()
  13. options.add_argument("--start-maximized")
  14. prefs = {"profile.default_content_settings.popups": 0,
  15.          "download.default_directory":
  16.                     r"C:Usersuser_dirDesktop\",#IMPORTANT - ENDING SLASH V IMPORTANT
  17.          "directory_upgrade": True}
  18. options.add_experimental_option("prefs", prefs)
  19. browser=webdriver.Chrome(<chromdriver.exe path>, options=options)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top