Highlights
- Playwright goes semver. We are jumping from
0.170.*
to1.8.0a1
to become semver compliant. This is a breaking change, but once we drop the Alpha bit, it'll be in stone for years! - Documentation site is now all about Python! It has guides, sample snippets, API docs
- You can now select elements based on layout with
:left-of()
,:right-of()
,:above()
and:below()
- New methods to assert element state like
page.is_editable('selector')
were added.
Migration from the pre-release versions
The API has changed since the last 0.170.0 version:
-
Snake case notation for methods and arguments:
# old browser.newPage()
# new browser.new_page()
-
Import has changed to include sync vs async mode explicitly:
# old from playwright import sync_playwright
# new from playwright.sync_api import sync_playwright
Browser Versions
- Chromium 90.0.4392.0
- Mozilla Firefox 85.0b5
- WebKit 14.1
New APIs
element_handle.is_checked()
element_handle.is_disabled()
element_handle.is_editable()
element_handle.is_enabled()
element_handle.is_hidden()
element_handle.is_visible()
page.is_checked(selector)
page.is_disabled(selector)
page.is_editable(selector)
page.is_enabled(selector)
page.is_hidden(selector)
page.is_visible(selector)
- New option
'editable'
inelementHandle.wait_for_element_state()