github microsoft/playwright-dotnet v0.162.0

latest releases: v1.43.0, v1.42.0, v1.41.2...
3 years ago

Major Changes

Driver updated to v.0.162.1. See playwright changelog: v1.6.0, v1.6.1 and v1.6.2.

Driver and browser install refactor.

Playwright Driver

Playwright drivers will be copied to the bin folder at build time. Nuget will rely on the RuntimeIdentifier to copy a platform-specific driver, or on the runtime used on dotnet publish.
If the RuntimeIdentifier is not set, all runtimes will be copied inside a runtimes folder. Then, the platform-specific driver will be picked at run-time.

Browsers

The way browsers are installed will vary depending on the use case scenario.

Playwright in test projects

If you use Playwright in test projects, all required browsers will be installed at build time.

Using Playwright in Docker

If you use the official Docker images, all the required browsers will be installed in that image.
The minor version of the package will tell you which docker image tag to use. For instance, PlaywrightSharp 0.162.0 will work with the tag v1.6.2.

Using Playwright in a Remote Server.

If you run Playwright in a remote server. For instance, as part of a web application, you will need to run .\bin\playwright-cli.exe install in Windows or ./bin/playwright-cli install in OSX/Linux as part of your deploy script.

New APIs

  • 4679039 BrowserContextOptions was implemented to receive a DeviceDescription in the constructor.
  • e6aee6c New Request.Timing.
  • c5a86d6 New recordVideo argument in BrowserContext creation.
  • c5a86d6 New recordHAR argument in BrowserContext creation.
  • 93cb3f4 Use Page.Websocket event and the new WebSocket class to inspect WebSocket connections.
  • c9ab521 Introduce TapAsync.
await using var context = await _browser.NewContextAsync(new BrowserContextOptions(Playwright.Devices["iPhone 6"])
{
    TimezoneId = "America/Jamaica",
    Locale = "fr-CH",
    UserAgent = "UA",
});

Breaking Changes

  • c1809ae WaitForEvent methods were renamed to WaitForEventAsync.
  • ee860a8 Request.GetPostDataJsonAsync was renamed to Request.GetPostDataJson.

Changelog

  • b32e6e0 Made ResourceType more flexible.
  • 07727ac Fix actionability spelling.
  • 3182d5f Remove InstallAsync from docs.

Don't miss a new playwright-dotnet release

NewReleases is sending notifications on new releases.