microsoft / edge-selenium-tools

An updated EdgeDriver implementation for Selenium 3 with newly-added support for Microsoft Edge (Chromium).
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Apache License 2.0
88 stars 24 forks source link

Cannot install Microsoft.Edge.SeleniumTools along custom built Selenium package #2

Closed rhpijnacker closed 4 years ago

rhpijnacker commented 4 years ago

Somewhere along the version-line Chrome flipped the default for using the W3C protocol. Since the Selenium C# API was still only passing in the override if it was overriding the previous default value, this meant there was no way to override any more. See https://github.com/SeleniumHQ/selenium/issues/7521.

In the end we build a version of the Selenium binaries ourselves with the right fix and packaged this in a local NuGet repo with version 3.141.1-w3c-flag.

This means we cannot install the Microsoft.Edge.SeleniumTools along this version, as it requires an exact match on 3.141.0.

I'd rather not compile and package this myself too, just for the sake of being able to install it.

Any suggestions on how to approach this? Could you relax the requirement for the exact match?

bwalderman commented 4 years ago

@rhpijnacker, that's an interesting scenario we hadn't anticipated. Our package directly extends the base classes in the official Selenium package. For this to work, the installed Selenium package needs to be compatible with the version of Selenium we used to compile and test our package. The easiest way to ensure this is to require an exact version match. However, it should be safe to relax the version requirement since the Selenium 3 API contract is highly unlikely to change. I will look into it when I have some free time this week.

rhpijnacker commented 4 years ago

However, it should be safe to relax the version requirement since the Selenium 3 API contract is highly unlikely to change.

Indeed, annoyingly this also applies the Selenium 3 binaries, even in cases where an update is in order. This I why I had to resort to rebuilding the binaries myself in the first place.

I will look into it when I have some free time this week.

Thanks, that would be great. Looking forward to the result.

bwalderman commented 4 years ago

Hi @rhpijnacker, it is possible to relax the version requirement to 3.141.* but this won't be enough to solve your specific issue since it won't match pre-release suffixes like "-w3c-flag".

NuGet 5.6 allows version strings like "3.141.-" which will match pre-release packages. Details here: https://github.com/NuGet/Home/wiki/Support-pre-release-packages-with-floating-versions

However, NuGet 5.6 is still in preview, and we cannot require users to install a preview version of NuGet to successfully install our package. I'm sorry I don't have better news. Here are a couple alternatives to get you unblocked:

When installing Microsoft.Edge.SeleniumTools, you can ignore dependencies and install your private build of Selenium.WebDriver manually. Or, since you are already building a custom Selenium.WebDriver package, consider replacing the Edge/ directory with the contents of this repo.