chrome profiles user open with python

38

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("user-data-dir=C:\\Users\\pc name\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 2")
driver = webdriver.Chrome(executable_path='C:\\path\\to\\chromedriver.exe', chrome_options=options)
driver.get("https://www.google.com")

Comments

Submit
0 Comments