Microsoft.Edge.SeleniumTools 3.141.0 Prefix Reserved

There is a newer version of this package available.
See the version list below for details.
Install-Package Microsoft.Edge.SeleniumTools -Version 3.141.0
dotnet add package Microsoft.Edge.SeleniumTools --version 3.141.0
<PackageReference Include="Microsoft.Edge.SeleniumTools" Version="3.141.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Edge.SeleniumTools --version 3.141.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.Edge.SeleniumTools, 3.141.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Edge.SeleniumTools as a Cake Addin
#addin nuget:?package=Microsoft.Edge.SeleniumTools&version=3.141.0

// Install Microsoft.Edge.SeleniumTools as a Cake Tool
#tool nuget:?package=Microsoft.Edge.SeleniumTools&version=3.141.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Selenium Tools for Microsoft Edge

Selenium Tools for Microsoft Edge extends Selenium 3 with a unified driver to help you write automated tests for both the Microsoft Edge (EdgeHTML) and new Microsoft Edge (Chromium) browsers.

The EdgeDriver and EdgeDriverService classes included in this package are 100% backward-compatible with Selenium's built-in EdgeDriver, and will run Microsoft Edge (EdgeHTML) by default so you can use our classes as a seamless drop-in replacement. In addition to being compatible with your existing Selenium tests, Selenium Tools for Microsoft Edge gives you the ability to drive the new Microsoft Edge (Chromium) browser and unlock all of the latest functionality!

The classes in this package are based on the existing Edge.* and Chrome.* driver classes included in the Selenium project.

Before you Begin

We provide this package as a solution for users who prefer to remain on Selenium 3 since it is the current stable release, and users who have existing browser tests and want to add coverage for the new Microsoft Edge (Chromium) without changing their Selenium version.

The very same Edge driver classes we provide here will be included in Selenium 4 once it is officially released, and are already available today in the latest Selenium 4 Alpha release. If you are able to upgrade to Selenium 4 Alpha, there is no need to use this package as Selenium should already have everything you need built in!

Getting Starting

Requirements

Note: You will need the correct WebDriver executable for the version of Microsoft Edge you are attempting to drive. The executables are not included with this package. WebDriver executables for all supported versions of Microsoft Edge are available for download here.

For more information, and instructions on selecting the correct driver for your browser, check out the Microsoft Edge WebDriver documentation.

Installation

Add a reference to the Microsoft.Edge.SeleniumTools package to your .NET project.

Basic Usage

To use with Microsoft Edge (EdgeHTML), simple create a default instance of EdgeDriver. All of the same methods and properties that are currently available in Selenium 3 will continue to work:

var driver = new EdgeDriver();

To use with Microsoft Edge (Chromium) instead, create a new EdgeDriver and pass in an EdgeOptions instance with the UseChromium property set to true:

var options = new EdgeOptions();
options.UseChromium = true;

var driver = new EdgeDriver(options);

You can also use EdgeOptions to choose a specific binary. This is useful for testing Microsoft Edge Insider channels like the Beta:

var options = new EdgeOptions();
options.UseChromium = true;
options.BinaryLocation = @"C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe";

var driver = new EdgeDriver(options);

When an EdgeDriver instance is created using EdgeOptions, it will automatically create and launch the appropriate EdgeDriverService for either Microsoft Edge (EdgeHTML) or Microsoft Edge (Chromium).

If you would like to create an EdgeDriverService yourself, you can create one configured for Chromium using the CreateChromiumService() method. This is useful for customizations like enabling verbose log output:

using (var service = EdgeDriverService.CreateChromiumService())
{
    service.UseVerboseLogging = true;

    var driver = new EdgeDriver(service);
}

Note that it is not necessary to provide EdgeOptions when creating an EdgeDriver with your own EdgeDriverService this way. EdgeDriver will use the default options for either Microsoft Edge (EdgeHTML) or Microsoft Edge (Chromium) depending on what kind of service you provide. However, if you want to provide both an EdgeDriverService and EdgeOptions, you must ensure that they are both configured for the same version of Microsoft Edge. For example, it is not possible to use a default (EdgeHTML) EdgeDriverService and Chromium EdgeOptions. Attempting to do so will throw an error.

Using Chromium-Specific Options

Using EdgeOptions with UseChromium set to true gives you access to all of the same methods and properties that are available on Selenium's ChromeOptions class. For example, just like with other Chromium browsers, you can use the EdgeOptions.AddArguments() method to run Microsoft Edge (Chromium) in headless mode:

var options = new EdgeOptions();
options.UseChromium = true;
options.AddArgument("headless");
options.AddArgument("disable-gpu");

Note that these Chromium-specific properties and methods are always available but will have no effect if UseChromium is not enabled. Similarly, existing properties and methods meant for Microsoft Edge (EdgeHTML) will have no effect if UseChromium is enabled.

Contributing

We are glad you are interested in automating the latest Microsoft Edge browser and improving the automation experience for the rest of the community!

Before you begin, please read & follow our Contributor's Guide. Consider also contributing your feature or bug fix directly to Selenium so that it will be included in future Selenium releases.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

NuGet packages (17)

Showing the top 5 NuGet packages that depend on Microsoft.Edge.SeleniumTools:

Package Downloads
OcarambaLite

Framework to automate tests using Selenium WebDriver (lighten version without selenium drivers)

Bellatrix.Web

Bellatrix is a cross-platform, easily customizable and extendable .NET test automation framework that increases tests’ reliability.

Aquality.Selenium

Wrapper over Selenium WebDriver for .NET

Liberator.Driver

Liberator Driver works as an abstraction layer over Selenium WebDriver. Liberator uses Expected Conditions to avoid the race conditions common when automating a user interface, thereby ensuring a more efficient performance. Every setting of the individual driver types can be set using preferences, enabling the dependent frameworks built on its functionality to fine tune their performance. Errors in browser interaction are correctly trapped for all Selenium methods.

BasinFramework

A .NET browser automation framework based on Selenium WebDriver

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Microsoft.Edge.SeleniumTools:

Repository Stars
AutomateThePlanet/AutomateThePlanet-Learning-Series
Automate The Planet Series Source Code
ObjectivityLtd/Ocaramba
C# Framework to automate tests using Selenium WebDriver
Version Downloads Last updated
3.141.2 559,506 6/25/2020
3.141.1 49,855 5/11/2020
3.141.0 20,504 3/24/2020