Skip to content

v1.20.0

Compare
Choose a tag to compare
@aslushnikov aslushnikov released this 15 Mar 23:26
6332e25

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