3

I wanted to load the chromedriver with default profile of chrome. I used the below code to do that.

var options=new ChromeOptions();
options.AddArguments("--user-data-dir=C:\Users\username\AppData\Local\Google\Chrome\User Data");
var drivers=new ChromeDriver(options);

After I initiate the driver instance, the browser will be loaded with my profile.But soon after that the driver is getting timedout. I'm not able to proceed with further steps.

Can anyone help me with fixing this issue? I am using c#.net as my scripting language.

nitin chawda
  • 1,378
  • 11
  • 24

1 Answers1

1

If you want to load the default profile while the one already running in background, please change the profile name under this directory. Like change C:\Users\username\AppData\Local\Google\Chrome\User Data

Copy the contents from User Data into another folder and rename to whatever name you want to. Then give this path as --user-data arguments.

Orelse another way is close the default chrome profile running in background and execute it.

nitin chawda
  • 1,378
  • 11
  • 24