.NET version of the Playwright testing and automation library.
Перейти к файлу
Max Schmitt 84432a305c
chore: simplify Playwright CLI (#2451)
2023-01-25 17:54:11 +01:00
.build chore: new test harness options (#2246) 2022-08-12 23:31:58 +02:00
.github devops: bump GitHub Action workflows (#2367) 2022-11-03 14:49:14 -07:00
src chore: simplify Playwright CLI (#2451) 2023-01-25 17:54:11 +01:00
utils/docker chore: introduce Docker Jammy images (#2411) 2022-11-28 08:46:10 -10: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 Initial commit 2020-01-22 09:52:18 -03:00
README.md chore(roll): roll Playwright to 1.30.0-beta (#2450) 2023-01-23 15:07:11 +01:00
ROLLING.md docs: update ROLLING 2022-01-19 07:12:16 -08:00
build.sh chore: auto update run-driver scripts (#2378) 2022-11-08 14:22:27 -08:00

README.md

Playwright for .NET 🎭

NuGet version Join Slack

Linux macOS Windows
Chromium 110.0.5481.38
WebKit 16.4
Firefox 108.0.2

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