I am trying to create an automated test framework using the Selenium Wrapper: Coypu. When I try and run an Automated UI test I get the error: "Failed to load extension from: (file path goes here). Loading of unpacked extensions is disabled by the administrator."
It seems the issue is that my organization hasn't whitelisted the Automation Extensions for Chrome. All of the fixes that I've found online suggest disabling chrome extensions for the selenium webdriver by doing something like the following:
ChromeOptions options = new ChromeOptions();
options.AddAdditionalCapability("useAutomationExtension", false);
ChromeDriver driver = new ChromeDriver(options: options);
Here is the code where I set up my coypu browser session:
SessionConfiguration sessionConfig = new SessionConfiguration();
sessionConfig.Browser = Coypu.Drivers.Browser.Chrome;
sessionConfig.Timeout = TimeSpan.FromSeconds(30);
sessionConfig.RetryInterval = TimeSpan.FromSeconds(0.5);
//Browser is a static object that wraps a thread mapped dictionary of browserSessions.
//the start method adds a browser session to the Browser object's dictionary
Browser.Start(sessionConfig);
string DevEnviromentUrl = System.Configuration.ConfigurationManager.AppSettings["Dev"];
Browser.Visit(DevEnviromentUrl);
How to do I disable the automation extension in coypu?