Aquality.Selenium.Images
4.22.0
dotnet add package Aquality.Selenium.Images --version 4.22.0
NuGet\Install-Package Aquality.Selenium.Images -Version 4.22.0
<PackageReference Include="Aquality.Selenium.Images" Version="4.22.0" />
paket add Aquality.Selenium.Images --version 4.22.0
#r "nuget: Aquality.Selenium.Images, 4.22.0"
// Install Aquality.Selenium.Images as a Cake Addin #addin nuget:?package=Aquality.Selenium.Images&version=4.22.0 // Install Aquality.Selenium.Images as a Cake Tool #tool nuget:?package=Aquality.Selenium.Images&version=4.22.0
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:
Add the nuget dependency Aquality.Selenium to your project.
Create instance of Browser in your test method:
var browser = AqualityServices.Browser;
- 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();
- 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");
- Call element's methods to perform action with element:
emailTextBox.Type("email@domain.com");
- 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.
- 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")
- 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 | Versions 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. |
-
.NETStandard 2.0
- Aquality.Selenium (>= 4.22.0)
- OpenCvSharp4 (>= 4.10.0.20240616)
- OpenCvSharp4.runtime.linux-arm (>= 4.10.0.20240616)
- OpenCvSharp4.runtime.osx.10.15-x64 (>= 4.6.0.20230105)
- OpenCvSharp4.runtime.osx_arm64 (>= 4.8.1-rc)
- OpenCvSharp4.runtime.win (>= 4.10.0.20240616)
- OpenCvSharp4_.runtime.ubuntu.20.04-x64 (>= 4.10.0.20240616)
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.0 | 96 | 10/9/2024 |