I try to start EdgeWebDriver with selenium automation framework.I use the lastest drver which is corespond to my browser v129. My code looks like:
var edgeOptions = new OpenQA.Selenium.Edge.EdgeOptions();
edgeOptions.AcceptInsecureCertificates = true;
edgeOptions.AddArgument(@"user-data-dir=C:Users[MYUSERNAME]AppDataLocalMicrosoftEdgeUser Data");
edgeOptions.AddArgument("profile-directory=Profile 1");
edgeOptions.AddArgument("headless");
var edgeDriver = new OpenQA.Selenium.Edge.EdgeDriver(path, edgeOptions);
The browser is started but imeediatelly the driver throw the exception “session not created: Microsoft Edge failed to start: exited normally.
(session not created: DevToolsActivePort file doesn’t exist)”
I found on the interenet does setting the option ‘headless’ or ‘remote-debugging-port’ fix the issue usually, but it not work in my case.
0
Please give me more detailed information about SafeWebDriver so that I can check it futher. You can also try to kill all edge processes to see if the exception is still thrown. Before you run your code, you can use “taskkill /f /im msedge.exe” to kill edge processes
1