Aquality.Selenium.Images 4.22.1

dotnet add package Aquality.Selenium.Images --version 4.22.1                
NuGet\Install-Package Aquality.Selenium.Images -Version 4.22.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="Aquality.Selenium.Images" Version="4.22.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aquality.Selenium.Images --version 4.22.1                
#r "nuget: Aquality.Selenium.Images, 4.22.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 Aquality.Selenium.Images as a Cake Addin
#addin nuget:?package=Aquality.Selenium.Images&version=4.22.1

// Install Aquality.Selenium.Images as a Cake Tool
#tool nuget:?package=Aquality.Selenium.Images&version=4.22.1                

Build Status Quality Gate NuGet

Aquality Selenium for .NET

Overview

This package is a library designed to simplify your work with Selenium WebDriver.

You've got to use this set of methods, related to most common actions performed with web elements.

Most of performed methods are logged using NLog, so you can easily see a history of performed actions in your log.

We use interfaces where is possible, so you can implement your own version of target interface with no need to rewrite other classes.

Quick start

To start the project using Aquality.Selenium framework, you can download our template BDD project by this link.

Alternatively, you can follow the steps below:

  1. Add the nuget dependency Aquality.Selenium to your project.

  2. Create instance of Browser in your test method:

var browser = AqualityServices.Browser;
  1. Use Browser's methods directly for general actions, such as navigation, window resize, scrolling and alerts handling:
browser.Maximize();
browser.GoTo("https://wikipedia.org");
browser.WaitForPageToLoad();
  1. Use ElementFactory class's methods to get an instance of each element:
var emailTextBox = AqualityServices.Get<IElementFactory>().GetTextBox(By.Id("email_create"), "Email");

Or you can inherit a class from Form class and use existing ElementFactory:

private ITextBox EmailTextBox => ElementFactory.GetTextBox(By.Id("email_create"), "Email");
  1. Call element's methods to perform action with element:
emailTextBox.Type("email@domain.com");
  1. Handle basic authentication:
Assert.DoesNotThrowAsync(() => browser.RegisterBasicAuthenticationAndStartMonitoring("domain.com", "username", "password"),
                "Should be possible to set basic authentication async");

or intercept network requests/responses:

browser.Network.AddRequestHandler(
    new NetworkRequestHandler 
    { 
        RequestMatcher = req => true,
        ResponseSupplier = req => new HttpResponseData { Body = "my body content", StatusCode = 200 }
    });
Assert.DoesNotThrowAsync(() => browser.Network.StartMonitoring());

see more examples at NetworkHandlingTests.

  1. Emulate GeoLocation, Device, Touch, Media, UserAgent overrides, Disable script execution and more using DevTools extensions:
const double latitude = 35.8235;
const double longitude = -78.8256;
const double accuracy = 0.97;
Assert.DoesNotThrowAsync(() => DevTools.SetGeoLocationOverride(latitude, longitude, accuracy), "Should be possible to override geoLocation")
  1. Quit browser at the end:
browser.Quit();

Documentation

To get more details please look at wiki:

License

Library's source code is made available under the Apache 2.0 license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
4.22.1 88 11/29/2024
4.22.0 113 10/9/2024