mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
docs: update release notes docs (#6974)
This commit is contained in:
parent
226159defc
commit
aa2546592d
@ -5,6 +5,102 @@ title: "Release notes"
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
## Version 1.12
|
||||
|
||||
#### ⚡️ Introducing Playwright TestRunner
|
||||
|
||||
[Playwright TestRunner](./test-intro.md) is a **new test runner** built from scratch by Playwright team specifically to accommodate end-to-end testing needs:
|
||||
|
||||
- Run tests across all browsers.
|
||||
- Execute tests in parallel.
|
||||
- Enjoy context isolation and sensible defaults out of the box.
|
||||
- Capture videos, screenshots and other artifacts on failure.
|
||||
- Integrate your POMs as extensible fixtures.
|
||||
|
||||
Installation:
|
||||
```bash
|
||||
npm i -D @playwright/test
|
||||
```
|
||||
|
||||
Simple test `tests/foo.spec.ts`:
|
||||
|
||||
```ts
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('basic test', async ({ page }) => {
|
||||
await page.goto('https://playwright.dev/');
|
||||
const name = await page.innerText('.navbar__title');
|
||||
expect(name).toBe('Playwright');
|
||||
});
|
||||
```
|
||||
|
||||
Running:
|
||||
|
||||
```bash
|
||||
npx playwright test -c tests
|
||||
```
|
||||
|
||||
👉 Read more in [testrunner documentation](./test-intro.md).
|
||||
|
||||
#### 🧟♂️ Introducing Playwright Trace Viewer
|
||||
|
||||
[Playwright Trace Viewer](./trace-viewer.md) is a new GUI tool that helps exploring recorded Playwright traces after the script ran. Playwright traces let you examine:
|
||||
- page DOM before and after each Playwright action
|
||||
- page rendering before and after each Playwright action
|
||||
- browser network during script execution
|
||||
|
||||
Traces are recorded using the new [`property: BrowserContext.tracing`] API:
|
||||
|
||||
```ts
|
||||
const browser = await chromium.launch();
|
||||
const context = await browser.newContext();
|
||||
|
||||
// Start tracing before creating / navigating a page.
|
||||
await context.tracing.start({ screenshots: true, snapshots: true });
|
||||
|
||||
const page = await context.newPage();
|
||||
await page.goto('https://playwright.dev');
|
||||
|
||||
// Stop tracing and export it into a zip archive.
|
||||
await context.tracing.stop({ path: 'trace.zip' });
|
||||
```
|
||||
|
||||
Traces are examined later with the Playwright CLI:
|
||||
|
||||
|
||||
```sh
|
||||
npx playwright show-trace trace.zip
|
||||
```
|
||||
|
||||
That will open the following GUI:
|
||||
|
||||
![image](https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png)
|
||||
|
||||
👉 Read more in [trace viewer documentation](./trace-viewer.md).
|
||||
|
||||
|
||||
#### Browser Versions
|
||||
|
||||
- Chromium 93.0.4530.0
|
||||
- Mozilla Firefox 89.0
|
||||
- WebKit 14.2
|
||||
|
||||
This version of Playwright was also tested against the following stable channels:
|
||||
|
||||
- Google Chrome 91
|
||||
- Microsoft Edge 91
|
||||
|
||||
#### New APIs
|
||||
|
||||
- `reducedMotion` option in [`method: Page.emulateMedia`], [`method: BrowserType.launchPersistentContext`], [`method: Browser.newContext`] and [`method: Browser.newPage`]
|
||||
- [`event: BrowserContext.request`]
|
||||
- [`event: BrowserContext.requestFailed`]
|
||||
- [`event: BrowserContext.requestFinished`]
|
||||
- [`event: BrowserContext.response`]
|
||||
- `tracesDir` option in [`method: BrowserType.launch`] and [`method: BrowserType.launchPersistentContext`]
|
||||
- new [`property: BrowserContext.tracing`] API namespace
|
||||
- new [`method: Download.page`] method
|
||||
|
||||
## Version 1.11
|
||||
|
||||
🎥 New video: [Playwright: A New Test Automation Framework for the Modern Web](https://youtu.be/_Jla6DyuEu4) ([slides](https://docs.google.com/presentation/d/1xFhZIJrdHkVe2CuMKOrni92HoG2SWslo0DhJJQMR1DI/edit?usp=sharing))
|
||||
|
Loading…
Reference in New Issue
Block a user