You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a auto test project, it's WorkerRole project type, that will deploy into Azure to auto execute. We found it didn't work for EdgeDriver, but work fine for ChromeDriver. We saw the “msedgedriver.exe" progress is under SYSTEM account in Task Manager list, and didn't quit by calling driver.Quit() method.
So we create a sample console application to test it from a Task Scheduler to run with different account. We saw it's working fine under both "Network Service" and "Local Service" account, but not working for "SYSTEM" account. It give "DevToolsActivePort file doesn't exist" error. Looks like EdgeDriver don't support "SYSTEM" account, or we miss any configuration to support this account. Please give some suggestion. Because we require to run it under SYSTEM account due to Azure WorkerRole looks like only support the SYSTEM account.
We use Selenium.WebDriver package 4.11.0, and edge browser version is 115.0.1901.183.
For Task Schedule test, we create a task to run a powershell script, in powershell script to execute the console application and get the test log. The task can be configured with different account. The Powershell script as below:
class Program
{
static void Main(string[] args)
{
WebDriver driver = null;
try
{
driver = new EdgeDriver();
driver.Url = "https://bing.com";
var element = driver.FindElement(By.Id("sb_form_q"));
element.SendKeys("WebDriver");
element.Submit();
Console.WriteLine("EdgeDriver element submitted.");
Thread.Sleep(5000);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
driver.Quit();
}
finally
{
driver.Quit();
}
}
}
The exception as below:
OpenQA.Selenium.WebDriverException: unknown error: Microsoft Edge failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.)
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver..ctor()
at EdgeDriverSample.Program.Main(String[] args) in D:\projects\EdgeDriverSample\EdgeDriverSample\Program.cs:line 19
The text was updated successfully, but these errors were encountered:
I ran into this problem as well, using Java. I created an Edge profile with bare-bones customisations and no installed extensions, copied it from C:\Users\<USER>\AppData\Local\Microsoft\Edge\User Data to <project>\src\main\resources\Edge\ then pointed EdgeOptions to it. Here's my implementation, let me know if it helps:
EdgeOptions options = new EdgeOptions();
// Verbose logging
options.setExperimentalOption("excludeSwitches", new String [] {"enable-logging"});
// Hide the "Personalise your Web experience" prompt by loading Edge with a custom profile
options.addArguments("profile-directory=Profile 1");
options.addArguments("user-data-dir=" + System.getProperty("user.dir") + "/src/main/resources/Edge");
// Disable browser extensions
options.addArguments("--disable-extensions");
// Disable any app pop-ups
options.addArguments("suppress-message-center-popups");
// Optionally run the browser headless
switch(_interface.toLowerCase())
{
case "gui":
{
driver = new EdgeDriver(options);
}
break;
case "headless":
{
options.addArguments("--headless");
driver = new EdgeDriver(options);
}
}
@jbakeri4 We test a Console application to run Edge test, not a Java web applciation to test. If you test it base on "SYSTEM" account, will have this exception.
We have downgrade to "Network Service" account previlege, now it's working. Looks like EdgeDriver don't support for SYSTEM account.
We have a auto test project, it's WorkerRole project type, that will deploy into Azure to auto execute. We found it didn't work for EdgeDriver, but work fine for ChromeDriver. We saw the “msedgedriver.exe" progress is under SYSTEM account in Task Manager list, and didn't quit by calling driver.Quit() method.
So we create a sample console application to test it from a Task Scheduler to run with different account. We saw it's working fine under both "Network Service" and "Local Service" account, but not working for "SYSTEM" account. It give "DevToolsActivePort file doesn't exist" error. Looks like EdgeDriver don't support "SYSTEM" account, or we miss any configuration to support this account. Please give some suggestion. Because we require to run it under SYSTEM account due to Azure WorkerRole looks like only support the SYSTEM account.
We use Selenium.WebDriver package 4.11.0, and edge browser version is 115.0.1901.183.
For Task Schedule test, we create a task to run a powershell script, in powershell script to execute the console application and get the test log. The task can be configured with different account. The Powershell script as below:
Console applicaiton source code:
The exception as below:
OpenQA.Selenium.WebDriverException: unknown error: Microsoft Edge failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.)
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver..ctor()
at EdgeDriverSample.Program.Main(String[] args) in D:\projects\EdgeDriverSample\EdgeDriverSample\Program.cs:line 19
The text was updated successfully, but these errors were encountered: