Selenium: c# EdgeDriver throws "unknown error" - 2.47

Created on 7 Aug 2015  路  6Comments  路  Source: SeleniumHQ/selenium

wedriver c# strong named api 2.47
MicrosoftEdgeDriver 10.0.10240.0

Replicate:
public static string EdgeServerPath
{
get
{
string path = string.Empty;
if (System.Environment.Is64BitOperatingSystem)
path = Path.Combine(System.Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%"), "Microsoft Web Driver");
else
path = Path.Combine(System.Environment.ExpandEnvironmentVariables("%ProgramFiles%"), "Microsoft Web Driver");

            return path;
        }
    }

...
IWebDriver driver = null;
EdgeOptions options = new EdgeOptions();
options.PageLoadStrategy = EdgePageLoadStrategy.Eager;
driver = new EdgeDriver(EdgeServerPath, options);
driver.FindElement(By.Id("main")).SendKeys(Keys.Control + "0");

StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 1129
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 923
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 888
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 90
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout) in c:\Projects\webdriver\dotnet\src\webdriver\Edge\EdgeDriver.cs:line 112
at OpenQA.Selenium.Edge.EdgeDriver..ctor(String EdgeDriverDirectory, EdgeOptions options, TimeSpan commandTimeout) in c:\Projects\webdriver\dotnet\src\webdriver\Edge\EdgeDriver.cs:line 90
at OpenQA.Selenium.Edge.EdgeDriver..ctor(String EdgeDriverDirectory, EdgeOptions options) in c:\Projects\webdriver\dotnet\src\webdriver\Edge\EdgeDriver.cs:line 78
at SeleniumWebDriver.TestConfiguration.get_DRIVER() in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver\TestConfiguration.cs:line 176
at SeleniumTest.TestBase.TestMethod(TestContext testContextInstance) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\TestBase.cs:line 25
at SeleniumTest.NutsNBoltsAjax.WebTest_NutsNBoltsAjax_Main() in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\NutsNBoltsAjax.cs:line 31

Most helpful comment

The reason for an "unknown error" is when you start the edge driver elevated (as Administrator) which is not permitted. As it is very badly programmed it does not spit out any intelligent error message (the worst programming style).

All 6 comments

The Selenium project does not develop or maintain the driver for Microsoft Edge. Issues and bug reports should be filed with Microsoft (http://connect.microsoft.com)

Hi jimevans, appreciate your support. Do you at least attempt to recreate the error? Could you double check if is an actual webdriver issue or the selenium client or both?

I'm not able to recreate the error, no. I _do_ have an exception being thrown because the driver can't find an element with an ID attribute of "main", but that's not the issue you're describing here.

Found a workaround, set the setting 'Open with' to 'A specific page or pages', 'Start page' default option do not work.

The reason for an "unknown error" is when you start the edge driver elevated (as Administrator) which is not permitted. As it is very badly programmed it does not spit out any intelligent error message (the worst programming style).

still happening as of today .. exactly as @Elmue mentioned

Was this page helpful?
0 / 5 - 0 ratings