release notes
release notes
Published 4/12/2022
MinorContains new features
New experimental role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
// Click a button with accessible name "log in"
await page.click('role=button[name="log in"]')
To use role selectors, make sure to pass PLAYWRIGHT_EXPERIMENTAL_FEATURES=1 environment variable:
// playwright.config.js
process.env.PLAYWRIGHT_EXPERIMENTAL_FEATURES = '1';
module.exports = {
/* ... */
};
Read more in our documentation.
New scale option in Page.screenshot for smaller sized screenshots.
New caret option in Page.screenshot to control text caret. Defaults to "hide".
New method expect.poll to wait for an arbitrary condition:
// Poll the method until it returns an expected result.
await expect.poll(async () => {
const response = await page.request.get('https://api.example.com');
return response.status();
}).toBe(200);
expect.poll supports most synchronous matchers, like .toBe(), .toContain(), etc.
Read more in our documentation.
PLAYWRIGHT_EXPERIMENTAL_TS_ESM env variable is
no longer required.mcr.microsoft.com/playwright docker image no longer contains Python. Please use mcr.microsoft.com/playwright/python
as a Playwright-ready docker image with pre-installed Python.Locator.setInputFiles API.This version was also tested against the following stable channels:
release notes
Published 4/12/2022
MinorContains new features
New experimental role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
// Click a button with accessible name "log in"
await page.click('role=button[name="log in"]')
To use role selectors, make sure to pass PLAYWRIGHT_EXPERIMENTAL_FEATURES=1 environment variable:
// playwright.config.js
process.env.PLAYWRIGHT_EXPERIMENTAL_FEATURES = '1';
module.exports = {
/* ... */
};
Read more in our documentation.
New scale option in Page.screenshot for smaller sized screenshots.
New caret option in Page.screenshot to control text caret. Defaults to "hide".
New method expect.poll to wait for an arbitrary condition:
// Poll the method until it returns an expected result.
await expect.poll(async () => {
const response = await page.request.get('https://api.example.com');
return response.status();
}).toBe(200);
expect.poll supports most synchronous matchers, like .toBe(), .toContain(), etc.
Read more in our documentation.
PLAYWRIGHT_EXPERIMENTAL_TS_ESM env variable is
no longer required.mcr.microsoft.com/playwright docker image no longer contains Python. Please use mcr.microsoft.com/playwright/python
as a Playwright-ready docker image with pre-installed Python.Locator.setInputFiles API.This version was also tested against the following stable channels:
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.