Iam trying to use a specific Profile of my Chrome Browser.
I know you have to make use of the user-data-dir
flag and add the path to your Profile.
Let's say I have a Profile named Profile 1
.
I've tried doing this:
options = webdriver.ChromeOptions()
options.add_argument(r"user-data-dir=C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Profile 1")
My problem is that Selenium by default Appends /Default
to this value, therefore not finding a valid Profile.
So far the Only workaround I've found is to create a default folder in my Profile Directory, and then Copy all files in this directory to the Default folder I created.
When I do this, This runs perfectly. But I don't like the Idea of having to do this process.
Please how else can I solve this without having to duplicate my Profie Files? Thanks.
EDIT
The answer in that question doesn't work.. Whoever answered the question said to put Profile <num>
as part of user-data-dir
which DOESN'T work!