Closed Shumatic closed 10 months ago
You can try this: Replace: driver.SetProfile "C:\Users\xxx\AppData\Local\Google\Chrome\User Data" driver.AddArgument ("user-data-dir=C:\Users\xxx\AppData\Local\Google\Chrome\User Data")
With: driver.AddArgument "profile-directory=Profile 1" driver.AddArgument "--user-data-dir=C:\Users\272763\AppData\Local\Google\Chrome\User Data\"
BUT: In the "driver.AddArgument "profile-directory=Profile 1"" replace "Profile 1" with your profile. To find this open the webpage "chrome://version/" while logged-in to the profile you want to open with VBA. You should the see something like "C:\Users\teasaster\AppData\Local\Google\Chrome\User Data\Profile 1". Copy the last part and replace "Profile 1" in driver.AddArgument "profile-directory=Profile 1"
To give you a complete picture, this is the part of the code I used to enter to a website with my profile:
Dim driver As New ChromeDriver driver.AddArgument "profile-directory=Profile 1" driver.AddArgument "--user-data-dir=C:\Users\272763\AppData\Local\Google\Chrome\User Data\" driver.Start driver.Window.Maximize driver.Get "https://www.mywebsite.com"
Thanks looks like this do the trix:-)
You can try this: Replace: driver.SetProfile "C:\Users\xxx\AppData\Local\Google\Chrome\User Data" driver.AddArgument ("user-data-dir=C:\Users\xxx\AppData\Local\Google\Chrome\User Data")
With: driver.AddArgument "profile-directory=Profile 1" driver.AddArgument "--user-data-dir=C:\Users\272763\AppData\Local\Google\Chrome\User Data"
BUT: In the "driver.AddArgument "profile-directory=Profile 1"" replace "Profile 1" with your profile. To find this open the webpage "chrome://version/" while logged-in to the profile you want to open with VBA. You should the see something like "C:\Users\teasaster\AppData\Local\Google\Chrome\User Data\Profile 1". Copy the last part and replace "Profile 1" in driver.AddArgument "profile-directory=Profile 1"
To give you a complete picture, this is the part of the code I used to enter to a website with my profile:
Dim driver As New ChromeDriver driver.AddArgument "profile-directory=Profile 1" driver.AddArgument "--user-data-dir=C:\Users\272763\AppData\Local\Google\Chrome\User Data" driver.Start driver.Window.Maximize driver.Get "https://www.mywebsite.com/"
Hi there, I'm getting the following error "Run-time error '33: SessionNotCreatedError session not created: Chrome failed to start: exited normally, (session not created: DevToolsActivePort file doesn't exist) The process started from chrome location C: program Files.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed. (Driver info: chromedriver=120.0.6099.109"), in the line driver.Start I copied and pasted your code and just changed the profile-directory and the user-data-dir with my user folders. However, it is not crashing as the error is assuming since I can see the Chrome windows popping up with my user in it. Any ideas what is wrong? Thanks!
you need to close every running process of chrome to make it work!
Hi
Thanks for this Wrapper:-) I am trying to open a new instance of chrome with my default profile, with chrome open, like this
and i get this error.
is there a workaroun for this? I read i should use an other profile, but i need my default one, and copying it isn't a solution as it is 4Gb
is there a workaroun for this? I read i should copy my profile and use that, but i need my default one, and copying it isn't a solution as it is 4Gb