Using default profile for chrome browser in window using selenium chrome driver (python)

1,162 views
Skip to first unread message

Ebube Chukwuma

unread,
Oct 11, 2022, 6:05:52 PM10/11/22
to ChromeDriver Users
It will be great if you can help me fix issue I am facing around usage of default profile for chrome browser in window . 

I am trying to access https://www.instagram.com/

I wanted to use default profile of a user for chrome browser . I used below path to access default profile for user. When browser opens up it doesn’t use my default profile and launches browser with new profile which prompts for user name and password . Any idea how to use default profile data for chrome browser in window


o = webdriver.ChromeOptions()
o.add_argument = {'--user-data-dir': 'C:\Users\EBUBE\AppData\Local\Google\Chrome\User Data\Default'}

s = Service(CHROME_DRIVER_PATH)
driver = webdriver.Chrome(service=s, options=o)
driver.get("https://www.instagram.com/")
print(driver.title)

i want my webdriver to open with default profile so that i dont login again to instagram

Robert Turner

unread,
Oct 11, 2022, 6:48:27 PM10/11/22
to ChromeDriver Users
Have you verified that Chrome is being launched with the user dir you are providing? I have noticed that at least when not provided, a temporary directory is provided by ChromeDriver.
Turn on ChromeDriver logging and have a look at the parameters it's used for Chrome and confirm what you are providing is being passed to Chrome when it's launched.

Reply all
Reply to author
Forward
0 new messages