I am trying to get Selenium to open Chrome just as if I was opening it myself, i.e. I should be logged into my accounts like Facebook.
I have the following code:
def startChrome():
options = webdriver.ChromeOptions()
options.add_argument("user-data-dir=/Users/alexiseggermont/Library/Application Support/Google/Chrome/Default/")
driver = webdriver.Chrome(chrome_options=options)
driver.set_page_load_timeout(60)
return driver
driver = startChrome()
url = 'https://www.facebook.com'
driver.get(url)
However this gets me to Facebook without being logged in. I have checked chrome://version
and the profile URL is in fact correct. What am I doing wrong?
Using Python 3, Chrome Version 63.0.3239.84, MacOS High Sierra