![]() |
VOOZH | about |
dotnet add package E13.Common.Nunit.UI --version 2025.117.22
NuGet\Install-Package E13.Common.Nunit.UI -Version 2025.117.22
<PackageReference Include="E13.Common.Nunit.UI" Version="2025.117.22" />
<PackageVersion Include="E13.Common.Nunit.UI" Version="2025.117.22" />Directory.Packages.props
<PackageReference Include="E13.Common.Nunit.UI" />Project file
paket add E13.Common.Nunit.UI --version 2025.117.22
#r "nuget: E13.Common.Nunit.UI, 2025.117.22"
#:package E13.Common.Nunit.UI@2025.117.22
#addin nuget:?package=E13.Common.Nunit.UI&version=2025.117.22Install as a Cake Addin
#tool nuget:?package=E13.Common.Nunit.UI&version=2025.117.22Install as a Cake Tool
👁 NuGet Version
👁 License: MIT
E13.Common.Nunit.UI is a specialized package within the E13.Common collection designed for UI testing with NUnit and PuppeteerSharp. It extends E13.Common.Nunit with UI-specific testing utilities, including browser automation, screenshot comparison, and authentication helpers for web applications.
dotnet add package E13.Common.Nunit.UI
using E13.Common.Nunit.UI;
using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using PuppeteerSharp;
using System.Threading.Tasks;
// Create a test fixture for your UI
public class MyUITests : BaseUIFixture
{
// Define viewport dimensions
public MyUITests()
: base(1280, 720, () => CreateHostBuilder())
{
}
private static IHostBuilder CreateHostBuilder() =>
Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<TestStartup>();
});
[Test]
public async Task HomePage_LoadsCorrectly()
{
// Navigate to a page
await Page.GoToAsync("https://localhost:5001");
// Take and compare a screenshot
await Page.ConfirmScreenshot("HomePage");
// Assert page content
var title = await Page.GetTitleAsync();
Assert.AreEqual("Home Page", title);
}
}
using E13.Common.Nunit.UI;
using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System.Threading.Tasks;
public class AuthenticatedUITests : BaseAuthUIFixture
{
protected override string AuthUrl => "https://localhost:5001/login";
public AuthenticatedUITests()
: base(1280, 720, () => CreateHostBuilder())
{
}
private static IHostBuilder CreateHostBuilder() =>
Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<TestStartup>();
});
[Test]
[RequiresAuth]
public async Task SecurePage_WhenAuthenticated_ShowsContent()
{
// The [RequiresAuth] attribute will trigger automatic login
// Navigate to a secure page
await Page.GoToAsync("https://localhost:5001/secure");
// Take and compare a screenshot
await Page.ConfirmScreenshot("SecurePage");
// Assert secure content is visible
var content = await Page.QuerySelectorAsync(".secure-content");
Assert.IsNotNull(content);
}
}
E13.Common.Nunit.UI is part of the E13.Common collection, which includes:
Contributions to E13.Common.Nunit.UI are welcome. If you have suggestions or improvements, please submit an issue or create a pull request in the GitHub repository.
This project is licensed under the MIT License. For more details, see the LICENSE file in the repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2025.117.22 | 213 | 4/27/2025 |
| 2025.114.21 | 229 | 4/24/2025 |
| 2025.114.20 | 235 | 4/24/2025 |
| 2025.114.19 | 239 | 4/24/2025 |
| 2025.114.18 | 239 | 4/24/2025 |
| 2025.112.17 | 247 | 4/22/2025 |
| 2025.112.16 | 251 | 4/22/2025 |
| 2025.111.15 | 252 | 4/21/2025 |
| 2025.106.14 | 257 | 4/16/2025 |
| 2025.106.12 | 277 | 4/16/2025 |
| 2025.97.11 | 248 | 4/7/2025 |
| 2025.96.9 | 251 | 4/6/2025 |
| 2025.96.8 | 242 | 4/6/2025 |
| 2025.91.7 | 238 | 4/1/2025 |
| 2025.91.6 | 232 | 4/1/2025 |
| 2025.90.4 | 243 | 3/31/2025 |
| 2023.30.1 | 482 | 1/30/2023 |
| 2023.18.1 | 432 | 1/18/2023 |
| 2021.324.4 | 1,308 | 11/20/2021 |
| 1.0.0 | 244 | 4/1/2025 |