Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. from selenium import webdriver
  2. import os
  3. from selenium.webdriver.chrome.options import Options
  4.  
  5. dataDir = "--user-data-dir=path to Chrome Profile 2"
  6. chrome_options2 = Options()
  7. chrome_options2.add_argument(dataDir)
  8. chrome_options2.add_argument("--profile-directory=Profile 2")
  9.  
  10. executable_path = "path to chromedriver"
  11. os.environ["webdriver.chrome.driver"] = executable_path
  12. driver=webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options2)
  13.  
  14. driver.get('target utl')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement