.NET version of the Playwright testing and automation library.
Перейти к файлу
Max Schmitt eb9a43bd66
chore: mark 1.32.0 (#2527)
2023-03-27 22:20:17 +02:00
.build chore: new test harness options (#2246) 2022-08-12 23:31:58 +02:00
.github chore: Configure awaits in CDPSession (#2465) 2023-01-27 13:00:16 +01:00
src chore: mark 1.32.0 (#2527) 2023-03-27 22:20:17 +02:00
utils/docker devops: fix Jammy Docker publishing 2023-03-17 15:13:02 +01:00
.gitattributes
.gitignore chore: fix dotnet build did not pack the same results as dotnet pack (#2273) 2022-08-28 10:53:47 +02:00
CONTRIBUTING.md feat: add api response assertions (#2270) 2022-08-24 17:45:23 +02:00
Directory.Build.props chore: upgrade C# LangVersion to version 10 (#2305) 2022-09-12 20:54:37 +02:00
LICENSE
README.md chore(roll): roll Playwright to 1.32.0-beta-1679448099000 (#2516) 2023-03-22 19:28:09 +01:00
ROLLING.md docs: update ROLLING 2022-01-19 07:12:16 -08:00
build.sh chore: roll driver to 1.31.0-beta-1676584193000 (#2485) 2023-02-16 18:52:22 -08:00

README.md

Playwright for .NET 🎭

NuGet version Join Slack

Linux macOS Windows
Chromium 112.0.5615.29
WebKit 16.4
Firefox 111.0

Playwright for .NET is the official language port of Playwright, the library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast.

Documentation

https://playwright.dev/dotnet/docs/intro

API Reference

https://playwright.dev/dotnet/docs/api/class-playwright

using System.Threading.Tasks;
using Microsoft.Playwright;

class Program
{
    public static async Task Main()
    {
        using var playwright = await Playwright.CreateAsync();
        await using var browser = await playwright.Chromium.LaunchAsync(new() { Headless = false });
        var page = await browser.NewPageAsync();
        await page.GotoAsync("https://playwright.dev/dotnet");
        await page.ScreenshotAsync(new() { Path = "screenshot.png" });
    }
}

Other languages

More comfortable in another programming language? Playwright is also available in