SeleniumManager.Core 1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package SeleniumManager.Core --version 1.2.1                
NuGet\Install-Package SeleniumManager.Core -Version 1.2.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SeleniumManager.Core" Version="1.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SeleniumManager.Core --version 1.2.1                
#r "nuget: SeleniumManager.Core, 1.2.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SeleniumManager.Core as a Cake Addin
#addin nuget:?package=SeleniumManager.Core&version=1.2.1

// Install SeleniumManager.Core as a Cake Tool
#tool nuget:?package=SeleniumManager.Core&version=1.2.1                

Selenium Manager

Selenium Manager is a .NET library designed to simplify parallel testing and dynamic browser instance management using Selenium WebDriver.

Table of Contents

Features

  • Simplifies parallel testing with Selenium WebDriver
  • Dynamic browser instance management
  • Automatic browser selection based on statistics
  • Customizable browser options
  • Easily integrate with your existing Selenium projects

Installation

To use Selenium Manager, you need to install the NuGet package SeleniumManager.Core.

Usage

Initializing Selenium Manager

To get started, you'll need to initialize the Selenium Manager by creating an instance of the SeleniumManager class. You can provide a custom configuration file path or use the default configuration included in the library.

using SeleniumManager.Core;

// Initialize Selenium Manager with default configuration
var configManager = new ConfigManager();
var seleniumManager = new SeleniumManager(configManager);

Enqueuing Actions

Enqueuing an action allows you to add a function to the execution queue, which will be processed in parallel on available browser instances.

// Enqueue an action without specifying a browser
var result = await seleniumManager.EnqueueAction(BrowseWebsite);

// Enqueue an action and specify the browser
var chromeResult = await seleniumManager.EnqueueAction(BrowseWebsite, WebDriverType.Chrome.GetDescription());

Parallel Testing

Selenium Manager makes it easy to perform parallel testing by enqueuing multiple actions simultaneously.

using System.Threading.Tasks;
using System.Collections.Generic;

// Perform parallel testing with multiple tasks
List<Task> tasks = new List<Task>();

for (int i = 0; i < 10; i++)
{
    Task task = Task.Run(async () =>
    {
        await seleniumManager.EnqueueAction(BrowseWebsite);
    });

    tasks.Add(task);
}

await Task.WhenAll(tasks);

Configuration Setting

The behavior of Selenium Manager can be customized using the ConfigurationSettings class. This class encapsulates various configuration options related to Selenium Grid communication, browser options, concurrency, and more. For detailed information about the available properties and their usage, please refer to the ConfigurationSettings Reference.

API Reference

For detailed information about the available classes, methods, and options, please refer to the API Reference.

Contributing

Contributions to this project are welcome! For more information on how to contribute, please read the Contributing Guidelines.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.1 1,984 9/10/2023
1.3.0 150 9/2/2023
1.2.1 147 8/27/2023
1.2.0 144 8/26/2023
1.1.0 188 8/15/2023
0.0.0.5-alpha 136 8/11/2023
0.0.0.4-alpha 133 8/6/2023
0.0.0.3-alpha 114 7/16/2023
0.0.0.2-alpha 118 6/24/2023
0.0.0.1-alpha 123 5/21/2023