Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- import os
- from selenium.webdriver.chrome.options import Options
- dataDir = "--user-data-dir=path to Chrome Profile 2"
- chrome_options2 = Options()
- chrome_options2.add_argument(dataDir)
- chrome_options2.add_argument("--profile-directory=Profile 2")
- executable_path = "path to chromedriver"
- os.environ["webdriver.chrome.driver"] = executable_path
- driver=webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options2)
- driver.get('target utl')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement