OneStreamAutoLibrary.PlaywrightHelpers 2026.4.12.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package OneStreamAutoLibrary.PlaywrightHelpers --version 2026.4.12.1
                    
NuGet\Install-Package OneStreamAutoLibrary.PlaywrightHelpers -Version 2026.4.12.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="OneStreamAutoLibrary.PlaywrightHelpers" Version="2026.4.12.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OneStreamAutoLibrary.PlaywrightHelpers" Version="2026.4.12.1" />
                    
Directory.Packages.props
<PackageReference Include="OneStreamAutoLibrary.PlaywrightHelpers" />
                    
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 OneStreamAutoLibrary.PlaywrightHelpers --version 2026.4.12.1
                    
#r "nuget: OneStreamAutoLibrary.PlaywrightHelpers, 2026.4.12.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.
#:package OneStreamAutoLibrary.PlaywrightHelpers@2026.4.12.1
                    
#: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=OneStreamAutoLibrary.PlaywrightHelpers&version=2026.4.12.1
                    
Install as a Cake Addin
#tool nuget:?package=OneStreamAutoLibrary.PlaywrightHelpers&version=2026.4.12.1
                    
Install as a Cake Tool

PlaywrightHelpers

A helper library for Playwright-based UI automation in .NET. It provides reusable browser setup, configuration access, wait helpers, page interaction utilities, and screenshot capture for Playwright test projects.

Integration

PlaywrightHelpers is designed to be used by:

  • Web and UI test projects using xUnit and Playwright
  • Shared automation frameworks that need consistent browser, page, and configuration helpers
  • CI pipelines that run Playwright tests with environment-variable-based configuration

Features

  • Browser bootstrapping with support for Chromium, Firefox, WebKit, and Edge channel
  • Centralized configuration via Config/TestExecutionConfig.json and environment variables
  • Config file discovery from the current working directory or parent folders
  • Base URL, browser, headless, slow motion, run mode, and BrowserStack settings accessors
  • Shared Playwright base methods for waits, page state checks, frame/window switching, and interactions
  • Screenshot capture with timestamped file naming and automatic screenshot directory creation

Project Structure

  • Browser.cs - Creates and configures Playwright browser, context, and page instances
  • PlaywrightBase.cs - Shared wait, page-state, and interaction helper methods for derived classes
  • PlaywrightConfig.cs - Configuration accessors for execution settings, base URL, and remote execution values
  • ScreenCaptureLibrary.cs - Screenshot capture and path management utilities

Configuration

Configuration is loaded from:

  • Config/TestExecutionConfig.json
  • Environment variables, which override JSON values

PlaywrightConfig resolves the config file by checking the current directory, the application base directory, and then parent folders until it finds Config/TestExecutionConfig.json.

Common TestExecutionDetails keys

  • Browser
  • Environment
  • BaseUrl
  • Headless
  • SlowMo
  • RunMode
  • BuildName
  • MaxArchiveDays
  • PlaywrightConnectionUrl

Common configuration methods

  • GetBrowserFromConfigFile()
  • GetEnvironmentFromConfigFile()
  • GetBaseUrl()
  • GetHeadlessFromConfigFile()
  • GetHeadlessMode()
  • GetSlowMoFromConfigFile()
  • GetRunMode()
  • GetBuildName()
  • EnvironmentInfo()
  • BrowserStackCapabilities()

Sample TestExecutionConfig.json

{
  "TestExecutionDetails": {
    "Browser": "Chromium",
    "Environment": "QA",
    "BaseUrl": "https://qa.example.com",
    "Headless": "true",
    "SlowMo": "0",
    "RunMode": "Local",
    "BuildName": "Playwright Smoke Tests",
    "MaxArchiveDays": "30",
    "PlaywrightConnectionUrl": "wss://cdp.example.com/playwright"
  },
  "Environments": {
    "QA": {
      "BaseUrl": "https://qa.example.com"
    },
    "Dev": {
      "BaseUrl": "https://dev.example.com"
    }
  },
  "Users": {
    "TestUser1": {
      "Username": "test.user@example.com",
      "Password": "use-secure-secret-storage"
    }
  },
  "BrowserStack": {
    "User": "BrowserStackUser1",
    "DeviceName": "iPhone 15",
    "OperatingSystem": "Windows",
    "OSVersion": "11",
    "Orientation": "portrait"
  },
  "BrowserCapabilities": {
    "Chromium": {
      "browserName": "chromium",
      "browserVersion": "latest"
    },
    "Firefox": {
      "browserName": "firefox",
      "browserVersion": "latest"
    }
  }
}

Quick Start

using Microsoft.Playwright;
using PlaywrightHelpers;

public class ExampleTest
{
    public async Task RunAsync()
    {
        using var playwright = await Playwright.CreateAsync();
        var (browser, context, page) = await Browser.CreateBrowserAsync(playwright);

        try
        {
            await page.GotoAsync(PlaywrightConfig.GetBaseUrl());

            var capture = new ScreenCaptureLibrary(page);
            await capture.Capture("example-home");
        }
        finally
        {
            await context.CloseAsync();
            await browser.CloseAsync();
        }
    }
}

Browser Setup

Browser.CreateBrowserAsync() uses the current configuration to:

  • select Chromium, Firefox, WebKit, or Edge
  • apply headless mode
  • apply slow motion delay
  • open a maximized browser context with no fixed viewport

Base Helpers

PlaywrightBase includes reusable helpers for common automation flows, such as:

  • WaitUntilElementExists()
  • WaitUntilElementVisible()
  • WaitUntilElementInvisible()
  • WaitUntilPageLoaded()
  • WaitUntilPageHasTitle()
  • SwitchToFrame()
  • SwitchToWindow()
  • Click()
  • InputText()

Screenshot Capture

ScreenCaptureLibrary captures full-page screenshots and stores them in a Screenshots folder under the solution root using a timestamped .png file name.

var capture = new ScreenCaptureLibrary(page);
await capture.Capture("login-page");

Notes

  • Keep secrets such as BrowserStack credentials in environment variables or secure pipeline secrets.
  • GetBaseUrl() throws an exception when BaseUrl is not configured, which helps catch invalid test setup early.
  • Prefer environment-specific values in Config/TestExecutionConfig.json for predictable local and CI behavior.
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 is compatible.  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. 
.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