This question already has an answer here:
I'm fairly new to python and the selenium used. I'm trying to open an automated browser with my user account but unfortunately, my code passes by without any error but my chrome is not signed in automatically.
line 1: from selenium import webdriver
line 2: from selenium.webdriver.chrome.options import Options
line 3: from selenium.webdriver.chrome.webdriver import WebDriver
line 4: options = Options()
line 5: options.add_argument("user-data-dir = /Users/muhammadnaveedbutt/Library/Application
line 6: Support/Google/Chrome/")
line 7: driver = webdriver.Chrome("/Users/muhammadnaveedbutt/PycharmProjects/shopping-bot/drivers/chromedriver", options=options)
line 8: driver.get('https://www.google.com')
The code works fine without errors. It launches Chrome and given website, but does not load profile while using python.