.NET version of the Playwright testing and automation library.
Перейти к файлу
campersau b768b4df2c
chore: enable Microsoft.CodeAnalysis.NetAnalyzers (#2639)
2023-07-14 18:14:01 +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: enable Microsoft.CodeAnalysis.NetAnalyzers (#2639) 2023-07-14 18:14:01 +02: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 Initial commit 2020-01-22 09:52:18 -03:00
README.md chore(roll): roll Playwright to v1.36.0 (#2634) 2023-07-13 19:35:46 +02:00
ROLLING.md docs: update ROLLING 2022-01-19 07:12:16 -08:00
SECURITY.md chore: Adding Microsoft SECURITY.MD (#2600) 2023-06-04 12:55:06 +02: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 115.0.5790.75
WebKit 17.0
Firefox 115.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