How to open a specific chrome profile and interact with it on python

Viewed 144

I need a script that opens a specific chrome profile and interacts by opening web pages using that profile. From another post on stackoverflow I found this code which in my case opens a different profile from the one I want.

This is the code

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("user-data-dir=C:\\Users\\giaco\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")
driver = webdriver.Chrome(executable_path=r'D:\chromedriver_win32\chromedriver.exe', options=options)
driver.get("https://www.google.co.in")

the profile I would like to use is to this path enter image description here

but the profile that is actually opened is this and it is not the profile I want but as if it were a guest profile enter image description here

how can I use the profile I want?

0 Answers
Related