github microsoft/playwright-dotnet v1.20.0

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

Web-First Assertions

Playwright for .NET 1.20 introduces Web-First Assertions.

Consider the following example:

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

namespace Playwright.TestingHarnessTest.NUnit
{
    public class ExampleTests : PageTest
    {
        [Test]
        public async Task StatusBecomesSubmitted()
        {
            await Expect(Page.Locator(".status")).ToHaveTextAsync("Submitted");
        }
    }
}

Playwright will be re-testing the node with the selector .status until
fetched Node has the "Submitted" text. It will be re-fetching the node and
checking it over and over, until the condition is met or until the timeout is
reached. You can pass this timeout as an option.

Read more in our documentation.

Other Updates

Announcements

  • v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit!

Browser Versions

  • Chromium 101.0.4921.0
  • Mozilla Firefox 97.0.1
  • WebKit 15.4

This version was also tested against the following stable channels:

  • Google Chrome 99
  • Microsoft Edge 99

Don't miss a new playwright-dotnet release

NewReleases is sending notifications on new releases.