1

I'm running an automation suite in Azure DevOps, using the VsTest task. The pipeline is running on a windows 2019 machine.

I want to add the option to run the tests against Edge.

Locally, I'm using the msedgedriver.exe binary for Edge version 79, using the following code:

    var service = EdgeDriverService.CreateDefaultService(PageState.AssemblyDirectory,
                      @"msedgedriver.exe");
    service.UseVerboseLogging = true;
    service.UseSpecCompliantProtocol = true;
    service.Start();
    var caps = new DesiredCapabilities(new Dictionary<string, object>()
    {
         { "ms:edgeOptions", new Dictionary<string, object>() {
               {  "binary",  @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" }
          }}
     });
     IWebDriver _driver = new RemoteWebDriver(service.ServiceUrl, caps);

When I run the tests in the Azure DevOps pipeline, I get an error of:

[error] [ERROR] unknown error: no msedge binary at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe

Has anyone else encountered this problem? How did you solve it? Is this a case of the virtual machine VsTest runs my suite on having an older version of Edge?

Cheers,

Beth

tldr: Can't work out how to run tests on Edge v.79 (Chromium) in an Azure Pipeline.

beef
  • 11
  • 1

1 Answers1

0

Does the following help?

var edgeOptions = new EdgeOptions();
var msedgedriverDir = @"D:\Software";
var msedgedriverExe = @"msedgedriver.exe";
var service = EdgeDriverService.CreateDefaultService(msedgedriverDir, msedgedriverExe);
var driver = new EdgeDriver(service, edgeOptions);
driver.Navigate().GoToUrl("https://bing.com");
Thread.Sleep(2000);
driver.Close();
service.Dispose();
Sam Hobbs
  • 2,594
  • 3
  • 21
  • 32