macosmicrosoft-edgewebdriver-manager

Do I need to install Microsoft Edge on Mac machine for tests to run?


Steps done: I downloaded https://github.com/bonigarcia/webdrivermanager and checkout to 5.0.3 tag. Webdrivermanager is a library that handles downloading drivers for running tests on different browsers. Came here because I was experimenting an issue with a project, and found out that is reproducible so anybody can reproduce.

I tried to run the Microsoft Edge tests on my mac. After running, webdrivermanager downloads the latest edge version. In /Users/raul/.cache/selenium I can find the msdriveredge being downloaded with the 110.0.1587.57 version. In the IntellJ console, I can check the driver is successfully downloaded with the latest version and a random port in localhost is opened to wait for HTTP requests.

When I perform the POST https://localhost:{port}/session request with any/some capabilities, I always get the following message:

"message": "unknown error: cannot find msedge binary\n  (Driver info: msedgedriver=110.0.1587.57 (01109f62642156c7eedb96d3c6fce911f01a896c),platform=Mac OS X 13.0.1 x86_64)"

As a result, the test fails.

I downloaded Microsoft edge, and now the tests run. This puzzles me a bit... Am I not supposed to be able to run the browser just with the .exe driver? Or is this a bug? Maybe I'm missing an environmental variable that I'm not aware of?


Solution

  • Yes, you need to install Microsoft Edge first before you start your automation project. In the official doc it says:

    To automate Microsoft Edge with WebDriver to simulate user interaction, you need three components:

    Microsoft Edge.

    Microsoft Edge WebDriver.

    A WebDriver testing framework.