.NET version of the Playwright testing and automation library.
Перейти к файлу
Max Schmitt e629971710
chore: mark 1.34.0 (#2587)
2023-05-26 14:02:14 -07: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.34.0 (#2587) 2023-05-26 14:02:14 -07:00
utils/docker devops: have Jammy as Docker default (#2564) 2023-04-27 18:27:59 +02:00
.gitattributes test: move upstream assets back in the repo (#1852) 2021-12-03 16:33:54 -08:00
.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 Playwright to 1.34.0-alpha-may-18-2023 (#2580) 2023-05-20 02:12:29 +02: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 114.0.5735.35
WebKit 16.4
Firefox 113.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