WebDriver fails to start the browser instance with not helpful error

Issue #15558750 • Assigned to Steven K.

Details

Author
Ivo T.
Created
Jan 22, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
16.16299
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

The issue happens with C# binding, Selenium 3.8.0 nugets, Edge & Edge web driver version 16299 on Azure VM box with Windows 10 (all updates).

When trying to make an instance of the driver like that:

var driver = new EdgeDriver(DriverPath, options);

or

var driver = new EdgeDriver(DriverPath);

(where DriverPath is the path to the driver) it fails with:

OpenQA.Selenium.WebDriverException : Unexpected error. Unknown error

This error message like probably most of us will agree, is not really helpful.

To be even more odd the same code on 2 other identical setup machines (this time real machines not VMs) with Windows 10 all updates (Edge 16299 again) works fine.

Any hints what might cause this issue? Also can we get a little bit better logging?

Two similar issues some time ago which never get resolved:
https://github.com/seleniumhq/selenium/issues/898
https://stackoverflow.com/questions/33272022/exception-occurs-if-you-instantiate-a-edgedriver?rq=1

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Ivo,

    My first guess is it is related to the path on the Azure VM to the MicrosoftWebDriver.exe.  My second guess is the MicrosoftWebDriver.exe version is not compatible with the OS version on the Azure VM.

    Will you provide your sample test code or a simplified repro for Azure?

    Appreciate the support,

    Steve

  • Hey Steve,

    This is the sample test code (also attached).

    App.config file:

    CS file (Add reference - System.configuration + install Selenium nugets):
    var driverPath = ConfigurationManager.AppSettings[“DriverPath”];
    var driver = new EdgeDriver(driverPath);

    “C:\Drivers” folder contains the correct version of MicrosoftWebDriver.exe.

    The OS version is identical on my local machine, both x64:

    Windows 10 Pro
    Version 1709
    OS Build 16299.192

    While making the sample code I think I found my issue :)

    “Microsoft Web Driver can’t be used with the Built-In Administrator account or while User Account Control is turned off.”

    So I guess the solution is to create another Administrator account which is not build in? (I need it to be admin and UAC to be off).

    I still think it’s good idea to improve the logging - not sure if its your fault or Selenium but I get this message only when run the sample code as a console application (when run like a proper nunit test I constantly get "Unexpected error. Unknown error".

    Regards,
    Ivo

  • Just to add - now its working - with the settings from the attached screenshot.

  • Hi Ivo,

    That is great news.  I have read about the “Admin” issue before, however, the issue was clear and I have not experienced it myself.  Thank you for the details.  I think this will help other Azure users.

    lol, I agree, the error message has some room for improvement.  :->  I will investigate the source and the options in this regard.

    Thanks again for this submission and the information,

    Steve

You need to sign in to your Microsoft account to add a comment.

Sign in