github microsoft/playwright-python v1.27.0

latest releases: v1.42.0, v1.41.2, v1.41.1...
17 months ago

Locators

With these new APIs, inspired by Testing Library, writing locators is a joy:

page.get_by_label("User Name").fill("John")

page.get_by_label("Password").fill("secret-password")

page.get_by_role("button", name="Sign in").click()

expect(page.get_by_text("Welcome, John!")).to_be_visible()

All the same methods are also available on Locator, FrameLocator and Frame classes.

Other highlights

  • As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release.

Behavior Changes

  • expect(locator).to_have_attribute(name, value) with an empty value does not match missing attribute anymore. For example, the following snippet will succeed when button does not have a disabled attribute.

    expect(page.get_by_role("button")).to_have_attribute("disabled", "")

Browser Versions

  • Chromium 107.0.5304.18
  • Mozilla Firefox 105.0.1
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 106
  • Microsoft Edge 106

Don't miss a new playwright-python release

NewReleases is sending notifications on new releases.