I have the error when run selenium on local machine which is Windows 10 Enterpise 64-bit (Microsoft Edge Version: 25.10586.672.0)and Microsoft WebDriver - Release 10240. My Sele
You may consider to look into the Release Notes as it mentions:
Updating .NET bindings to not send incorrect W3C Firefox capabilities Previously, RemoteWebDriver would send the same capabilities dictionary using both the "desiredCapabilities" and "capabilities" properties when requesting a new remote session. In the case of the language bindings expressly requesting to use the legacy Firefox driver, the capabilities dictionary will include properties that are invalid for the W3C-compliant remote server. To resolve that issue, we will mask the explicit attempt by setting a property that causes the .NET RemoteWebDriver to send a legacy-only compatible new session request when explicitly requesting the legacy driver.
I don't see any significant error as such in your code except one, to see NoSuchSessionException
. Instead of:
DesiredCapabilities capabilities = DesiredCapabilities.edge();
You should use:
DesiredCapabilities cap = new DesiredCapabilities();