0

I'm trying to load my Chrome profile for use with Selenium WebDriver but it doesn't work and always defaults to a new one. I tried the codes provided from here.

Is there any workaround or fix? I'd like to run ChromeDriver with customized extensions, options and whatnot since command line flags and ChromeOptions have restricted functionality.

Also, I'm having another issue about loading preconfigured extensions.

Community
  • 1
  • 1
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185

1 Answers1

0

I had the same problem.But I did something like this and it worked.

String userProfile= "C:/Users/"your user"/AppData/Local/Google/Chrome/User";
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=" + userProfile);
driver = new ChromeDriver(options);

Please let me know if it work also for you.

Luci
  • 85
  • 1
  • 12