TestKit.UIShield 1.1.3

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

// Install TestKit.UIShield as a Cake Tool
#tool nuget:?package=TestKit.UIShield&version=1.1.3

TestKit.UIShield

TestKit.UIShield is a .NET library for automated visual UI testing.

Features

Screenshots
  • Take screenshots of individual web elements on a page
  • Compare screenshots taken against 'known working' template images
Comparisons
  • Allow tolerances between images using expected difference percentages or through color masking on template images

Usage

UIShield adds extension methods to the pre-existing Screenshot class in Selenium.

Basic usage

var templateImage = (Bitmap)Image.FromFile("template.bmp"); // Load our template image
var screenshot = driver.GetScreenshot(); // Take a screenshot with our driver
var result = screenshot.Compare(templateImage); // Get our comparison result
Assert.Less(result.DifferencePercentage, 5); // Make an assertion that the differences are less than 5%

Exporting differences

The DiffImage - the template image with all detected differences showing as bright green - is provided by the ComparisonResult class, and can simply be saved out to a file.

var result = screenshot.Compare(templateImage); // Get our comparison result
result.DiffImage.Save("diff.bmp"); // Export our diff image as a bitmap
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  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.1.3 144 5/12/2023
1.1.2 187 7/21/2022
1.1.1 184 7/21/2022

v1.1.01
- Initial release