Selenium.Ui.Test.Helper 2.0.3

dotnet add package Selenium.Ui.Test.Helper --version 2.0.3
                    
NuGet\Install-Package Selenium.Ui.Test.Helper -Version 2.0.3
                    
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="Selenium.Ui.Test.Helper" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Selenium.Ui.Test.Helper" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Selenium.Ui.Test.Helper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Selenium.Ui.Test.Helper --version 2.0.3
                    
#r "nuget: Selenium.Ui.Test.Helper, 2.0.3"
                    
#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.
#:package Selenium.Ui.Test.Helper@2.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Selenium.Ui.Test.Helper&version=2.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Selenium.Ui.Test.Helper&version=2.0.3
                    
Install as a Cake Tool

Selenium Helper

Basic helper methods for selenium. Includes methds for initializing a driver and extension methods with automatic wait times for interacting with web elements.

Element actions

Get element

Waits for a single element to be displayed and returns it.

var elementLocator = By.Id("elementId");
elementLocator.GetElement(driver);

Get elements

Waits for elements to be displayed and returns them. Optionally, can wait for a specific number of elements to be displayed before retuning.

var elementsLocator = By.CssSelector(".list-item");
var elements = elementLocator.GetElements(driver);

// If expected number of elements is known, we can optionally wait for n number of elements to be displayed.
var elementsLocator = By.CssSelector(".list-item");
var elements = elementLocator.GetElements(driver, waitForElementCount: 10);

// Returns an element with specific text. For example to extract an item from a list where text = "Hello World"
var elementsLocator = By.CssSelector(".list-item");
var element = elementLocator.GetElementWithText(driver, "Hello World");

Click element

Waits for element to be displayed and performs click.

var elementLocator = By.Id("elementId");
elementLocator.Click(driver);

Enter text

Waits for text field/area to be displayed and enters text.

var elementLocator = By.Id("elementId");
elementLocator.SendKeys(driver, "value");

Clear text

Waits for text field/area to be displayed and clears text.

var elementLocator = By.Id("elementId");
elementLocator.Clear(driver);

Get text

Waits for element to be displayed and returns the text value of the element.

var elementLocator = By.Id("elementId");
var text = elementLocator.GetText(driver);

Clear text

Waits for text field/area to be displayed and returns the current value entered.

var elementLocator = By.Id("elementId");
var value = elementLocator.GetValue(driver);

Override default timeout

The default wait time for finding elements is set to 30 seconds. This value can be adjusted individually on each action method.

Set new global timeout

Add a new file to the root of your project called "testsettings.json" and a new timeout as follows.

elementLocator.SendKeys(driver, value, 20000); // Sets timeout on this step only to 20 seconds
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
2.0.3 395 10/26/2023
2.0.2 234 10/26/2023
2.0.1 234 10/26/2023
2.0.0 233 10/26/2023