Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 18 characters in body; edited tags
Source Link

I got the below code to open Chrome browser using Selenium with extension enabled. To enable multiple chrome extensions, do I need to repeat the steps or is there any simpler way?

String pathToExtension = “C:\Users\home\AppData\Local\Google\Chrome\User Data\Default\Extensions\mbopgmdnpcbohhpnfglgohlbhfongabi\2.3.1_0”; ChromeOptions options = new ChromeOptions(); options.addArguments(“–-load-extension=” + pathToExtension); driver = new ChromeDriver(options);

String pathToExtension = “C:\\Users\\home\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\mbopgmdnpcbohhpnfglgohlbhfongabi\\2.3.1_0”;
ChromeOptions options = new ChromeOptions();
options.addArguments(“–-load-extension=” + pathToExtension);
driver = new ChromeDriver(options);

I got the below code to open Chrome browser using Selenium with extension enabled. To enable multiple chrome extensions, do I need to repeat the steps or is there any simpler way?

String pathToExtension = “C:\Users\home\AppData\Local\Google\Chrome\User Data\Default\Extensions\mbopgmdnpcbohhpnfglgohlbhfongabi\2.3.1_0”; ChromeOptions options = new ChromeOptions(); options.addArguments(“–-load-extension=” + pathToExtension); driver = new ChromeDriver(options);

I got the below code to open Chrome browser using Selenium with extension enabled. To enable multiple chrome extensions, do I need to repeat the steps or is there any simpler way?

String pathToExtension = “C:\\Users\\home\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\mbopgmdnpcbohhpnfglgohlbhfongabi\\2.3.1_0”;
ChromeOptions options = new ChromeOptions();
options.addArguments(“–-load-extension=” + pathToExtension);
driver = new ChromeDriver(options);
Source Link
Jaden
  • 31
  • 1
  • 2

How to load multiple chrome extensions in Chrome browser using Selenium java?

I got the below code to open Chrome browser using Selenium with extension enabled. To enable multiple chrome extensions, do I need to repeat the steps or is there any simpler way?

String pathToExtension = “C:\Users\home\AppData\Local\Google\Chrome\User Data\Default\Extensions\mbopgmdnpcbohhpnfglgohlbhfongabi\2.3.1_0”; ChromeOptions options = new ChromeOptions(); options.addArguments(“–-load-extension=” + pathToExtension); driver = new ChromeDriver(options);