Failed to load extension from: C:\Users\userName\AppData\Local\Temp\scoped_dir18676_513995252\internal. Loading of unpacked extensions is disabled by the administrator.
I can't find a solution to prevent this pop-up each time I run test cases. Everything I've tried doesn't work and has been posted a two or more years ago. Yes this is something of a duplicate post but those solutions from 2+ years ago no longer work hence I'm asking again. This one is almost three years old discussing older versions of Chrome: Older Post Regarding the same
Working with Java Chrome version is 78.0.3904.87 Selenium version: 3.141.59
System.setProperty("webdriver.chrome.driver", ".\\Drivers\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
WebDriver driver = new ChromeDriver(options);
options.addArguments("start-maximized");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("disable-extensions");
This isn't part of the code now but I also tried this:
options.setExperimentalOption("excludeSwitches", new String[] {"enable-automation"});