github microsoft/playwright-dotnet v1.43.0

latest releases: v1.48.0, v1.47.0, v1.46.0...
7 months ago

New APIs

  • Method BrowserContext.ClearCookiesAsync() now supports filters to remove only some cookies.

    // Clear all cookies.
    await Context.ClearCookiesAsync();
    // New: clear cookies with a particular name.
    await Context.ClearCookiesAsync(new() { Name = "session-id" });
    // New: clear cookies for a particular domain.
    await Context.ClearCookiesAsync(new() { Domain = "my-origin.com" });
  • New property Locator.ContentFrame converts a Locator object to a FrameLocator. This can be useful when you have a Locator object obtained somewhere, and later on would like to interact with the content inside the frame.

    var locator = Page.Locator("iframe[name='embedded']");
    // ...
    var frameLocator = locator.ContentFrame;
    await frameLocator.GetByRole(AriaRole.Button).ClickAsync();
  • New property FrameLocator.Owner converts a FrameLocator object to a Locator. This can be useful when you have a FrameLocator object obtained somewhere, and later on would like to interact with the iframe element.

    var frameLocator = page.FrameLocator("iframe[name='embedded']");
    // ...
    var locator = frameLocator.Owner;
    await Expect(locator).ToBeVisibleAsync();

Browser Versions

  • Chromium 124.0.6367.8
  • Mozilla Firefox 124.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 123
  • Microsoft Edge 123

Don't miss a new playwright-dotnet release

NewReleases is sending notifications on new releases.