1

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);
0

Separate the path with a comma for the next one:

--load-extension=path/to/extension,path/to/another/extension

Solution from: https://stackoverflow.com/questions/20782557/load-unpacked-chrome-extension-programmatically

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.