0

When i run my program with the following code, it opens a new tab, that uses something like a guest account. Also, I am not able to log into anything with this tab.

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument(r'user-data-dir=C:\Users\Nick\AppData\Local\Google\Chrome\User Data\Profile 1')
driver = webdriver.Chrome(executable_path=r'C:\ChromeDriver\chromedriver.exe', chrome_options=options)
driver.get("https://www.google.com/")
Nick
  • 1

1 Answers1

1

Same happened to me. The solution was to remove "\Profile 1" from the first line and add a new line for that.

options.add_argument(r'user-data-dir=C:\Users\Nick\AppData\Local\Google\Chrome\User Data')
options.add_argument('profile-directory=Profile 1')

this should work. If not the case, please check these answers: First and Second