I have Selenium 4.11 with the latest version of ChromeDriver and Chrome, using python 3.11.5. Here is the code I am using to test Chrome opening up with a different profile. The code launches Chrome in the correct profile, but nothing happens. It doesnt go to "
". Any help is appriciated!
from selenium import webdriver
# Create an instance of the Options class
options = webdriver.ChromeOptions()
# Set the user data directory and profile directory
user_data_path = "C:\\Users\\user\\AppData\\Local\\Google\\Chrome\\User Data"
options.add_argument(f'--user-data-dir={user_data_path}')
options.add_argument('--profile-directory=Profile 2')
# Create a new Chrome webdriver instance with the specified options
driver = webdriver.Chrome(options=options)