Playwright - v1.28.0
Playwright Tools
- Record at Cursor in VSCode. You can run the test, position the cursor at the end of the test and continue generating the test.
- Live Locators in VSCode. You can hover and edit locators in VSCode to get them highlighted in the opened browser.
- Live Locators in CodeGen. Generate a locator for any element on the page using "Explore" tool.
- Codegen and Trace Viewer Dark Theme. Automatically picked up from operating system settings.
Test Runner
-
Configure retries and test timeout for a file or a test with
test.describe.configure([options])
.js // Each test in the file will be retried twice and have a timeout of 20 seconds. test.describe.configure({ retries: 2, timeout: 20_000 }); test('runs first', async ({ page }) => {}); test('runs second', async ({ page }) => {});
-
Use
testProject.snapshotPathTemplate
andtestConfig.snapshotPathTemplate
to configure a template controlling location of snapshots generated byexpect(page).toHaveScreenshot(name[, options])
andexpect(screenshot).toMatchSnapshot(name[, options])
.```js
// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';const config: PlaywrightTestConfig = {
testDir: './tests',
snapshotPathTemplate: '{testDir}/screenshots/{testFilePath}/{arg}{ext}',
};export default config;
```
New APIs
locator.blur([options])
locator.clear([options])
android.launchServer([options])
andandroid.connect(wsEndpoint[, options])
androidDevice.on('close')
Browser Versions
- Chromium 108.0.5359.29
- Mozilla Firefox 106.0
- WebKit 16.4
This version was also tested against the following stable channels:
- Google Chrome 107
- Microsoft Edge 107
Details
- 🔍View and search all Playwright releases.
- 🛠️Create and share lists to track your tools.
- 🚨Setup notifications for major, security, feature or patch updates.
- 🚀Much more coming soon!