Closed renovate[bot] closed 2 years ago
This new version of playwright is tested against Chromium 99 and 101. Chromium should be updated first.
Since we're Chromium v100 right now, playwright 1.19 seems more reasonable than 1.20. I'll make another PR.
This PR contains the following updates:
^1.7.1
->1.20.2
Release Notes
Microsoft/playwright
### [`v1.20.2`](https://togithub.com/Microsoft/playwright/releases/v1.20.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.20.1...v1.20.2) #### Highlights This patch includes the following bug fixes: [https://github.com/microsoft/playwright/issues/13078](https://togithub.com/microsoft/playwright/issues/13078) - \[BUG] Extension required when importing other files with type="module"[https://github.com/microsoft/playwright/issues/13099](https://togithub.com/microsoft/playwright/issues/13099)9 - \[BUG] beforeAll is called before each test (fullyParallel[https://github.com/microsoft/playwright/issues/13204](https://togithub.com/microsoft/playwright/issues/13204)04 - \[BUG] mask stalls the screenshot #### Browser Versions - Chromium 101.0.4921.0 - Mozilla Firefox 97.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 99 - Microsoft Edge 99 ### [`v1.20.1`](https://togithub.com/Microsoft/playwright/releases/v1.20.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.20.0...v1.20.1) #### Highlights This patch includes the following bug fixes: [https://github.com/microsoft/playwright/issues/12711](https://togithub.com/microsoft/playwright/issues/12711) - \[REGRESSION] Page.screenshot hangs on some sites[https://github.com/microsoft/playwright/issues/12807](https://togithub.com/microsoft/playwright/issues/12807)7 - \[BUG] Cookies get assigned before fulfilling a respons[https://github.com/microsoft/playwright/issues/12814](https://togithub.com/microsoft/playwright/issues/12814)14 - \[Question] how to use expect.any in playwrig[https://github.com/microsoft/playwright/issues/12821](https://togithub.com/microsoft/playwright/issues/12821)821 - \[BUG] Chromium: Cannot click, element intercepts pointer eve[https://github.com/microsoft/playwright/issues/12836](https://togithub.com/microsoft/playwright/issues/12836)2836 - \[REGRESSION]: Tests not detected as ES module in v[https://github.com/microsoft/playwright/issues/12862](https://togithub.com/microsoft/playwright/issues/12862)12862 - \[Feature] Allow to use toMatchSnapshot for file formats other than txt (e.g.[https://github.com/microsoft/playwright/issues/12887](https://togithub.com/microsoft/playwright/issues/12887)/12887 - \[BUG] Locator.count() with \_vue selector wit[https://github.com/microsoft/playwright/issues/12940](https://togithub.com/microsoft/playwright/issues/12940)es/12940 - \[BUG] npm audit - High Severity vulnerability in json5 package forcing to install Playwrigh[https://github.com/microsoft/playwright/issues/12974](https://togithub.com/microsoft/playwright/issues/12974)ues/12974 - \[BUG] Regression - chromium browser closes during test or debugging session on macos #### Browser Versions - Chromium 101.0.4921.0 - Mozilla Firefox 97.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 99 - Microsoft Edge 99 ### [`v1.20.0`](https://togithub.com/Microsoft/playwright/releases/v1.20.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.19.2...v1.20.0) ##### Highlights - New options for methods [`page.screenshot()`](https://playwright.dev/docs/api/class-page#page-screenshot), [`locator.screenshot()`](https://playwright.dev/docs/api/class-locator#locator-screenshot) and [`elementHandle.screenshot()`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot): - Option `animations: "disabled"` rewinds all CSS animations and transitions to a consistent state. - Option `mask: Locator[]` masks given elements, overlaying them with pink `#FF00FF` boxes. - [`expect().toMatchSnapshot()`](https://playwright.dev/docs/test-assertions#screenshot-assertions-to-match-snapshot) now supports anonymous snapshots: when snapshot name is missing, Playwright Test will generate one automatically: ```js expect('Web is Awesome <3').toMatchSnapshot(); ``` - New `maxDiffPixels` and `maxDiffPixelRatio` options for fine-grained screenshot comparison using [`expect().toMatchSnapshot()`](https://playwright.dev/docs/test-assertions#screenshot-assertions-to-match-snapshot): ```js expect(await page.screenshot()).toMatchSnapshot({ maxDiffPixels: 27, // allow no more than 27 different pixels. }); ``` It is most convenient to specify `maxDiffPixels` or `maxDiffPixelRatio` once in [`TestConfig.expect`](https://playwright.dev/docs/api/class-testconfig#test-config-expect). - Playwright Test now adds [`TestConfig.fullyParallel`](https://playwright.dev/docs/api/class-testconfig#test-config-fully-parallel) mode. By default, Playwright Test parallelizes between files. In fully parallel mode, tests inside a single file are also run in parallel. You can also use `--fully-parallel` command line flag. ```ts // playwright.config.ts export default { fullyParallel: true, }; ``` - [`TestProject.grep`](https://playwright.dev/docs/api/class-testproject#test-project-grep) and [`TestProject.grepInvert`](https://playwright.dev/docs/api/class-testproject#test-project-grep-invert) are now configurable per project. For example, you can now configure smoke tests project using `grep`: ```ts // playwright.config.ts export default { projects: [ { name: 'smoke tests', grep: /@smoke/, }, ], }; ``` - [Trace Viewer](https://playwright.dev/docs/trace-viewer) now shows [API testing requests](https://playwright.dev/docs/test-api-testing). - [`locator.highlight()`](https://playwright.dev/docs/api/class-locator#locator-highlight) visually reveals element(s) for easier debugging. ##### Announcements - We now ship a designated Python docker image `mcr.microsoft.com/playwright/python`. Please switch over to it if you use Python. This is the last release that includes Python inside our javascript `mcr.microsoft.com/playwright` docker image. - v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit! ##### Browser Versions - Chromium 101.0.4921.0 - Mozilla Firefox 97.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 99 - Microsoft Edge 99 ### [`v1.19.2`](https://togithub.com/Microsoft/playwright/releases/v1.19.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.19.1...v1.19.2) #### Highlights This patch includes the following bug fixes: [https://github.com/microsoft/playwright/issues/12091](https://togithub.com/microsoft/playwright/issues/12091) - \[BUG] playwright 1.19.0 generates more than 1 trace file per test[https://github.com/microsoft/playwright/issues/12106](https://togithub.com/microsoft/playwright/issues/12106)6 - \[BUG] Error: EBUSY: resource busy or locked when using volumes in docker-compose with playwright 1.19.0 and mcr.microsoft.com/playwright:v1.15.0-focal #### Browser Versions - Chromium 100.0.4863.0 - Mozilla Firefox 96.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 98 - Microsoft Edge 98 ### [`v1.19.1`](https://togithub.com/Microsoft/playwright/releases/v1.19.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.19.0...v1.19.1) #### Highlights This patch includes the following bug fixes: [https://github.com/microsoft/playwright/issues/12075](https://togithub.com/microsoft/playwright/issues/12075) - \[Question] After update to 1.19 firefox fails to run[https://github.com/microsoft/playwright/issues/12090](https://togithub.com/microsoft/playwright/issues/12090)0 - \[BUG] did something change on APIRequest/Response APIs ? #### Browser Versions - Chromium 100.0.4863.0 - Mozilla Firefox 96.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 98 - Microsoft Edge 98 ### [`v1.19.0`](https://togithub.com/Microsoft/playwright/releases/v1.19.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.18.1...v1.19.0) #### Version 1.19 ##### Playwright Test Updates ##### Soft assertions Playwright Test v1.19 now supports **soft assertions**. Failed soft assertions **do not** terminate test execution, but mark the test as failed. Read more in [our documentation](https://playwright.dev/docs/test-assertions#soft-assertions). ```js // Make a few checks that will not stop the test when failed... await expect.soft(page.locator('#status')).toHaveText('Success'); await expect.soft(page.locator('#eta')).toHaveText('1 day'); // ... and continue the test to check more things. await page.locator('#next-page').click(); await expect.soft(page.locator('#title')).toHaveText('Make another order'); ``` ##### Custom error messages You can now specify a [**custom error message**](https://playwright.dev/docs/test-assertions#custom-error-message) as a second argument to the `expect` and `expect.soft` functions, for example: ```js await expect(page.locator('text=Name'), 'should be logged in').toBeVisible(); ``` The error would look like this: ```bash Error: should be logged in Call log: - expect.toBeVisible with timeout 5000ms - waiting for selector "text=Name" 2 | 3 | test('example test', async({ page }) => { > 4 | await expect(page.locator('text=Name'), 'should be logged in').toBeVisible(); | ^ 5 | }); 6 | ``` ##### Parallel mode in file By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now run them in parallel with [`method: test.describe.configure`](https://playwright.dev/docs/api/class-test#test-describe-configure): ```js import { test } from '@playwright/test'; test.describe.configure({ mode: 'parallel' }); test('parallel 1', async () => {}); test('parallel 2', async () => {}); ``` ##### [β οΈ](https://emojipedia.org/warning/#:~:text=A%20triangle%20with%20an%20exclamation,to%20Emoji%201.0%20in%202015.) Potentially breaking change in Playwright Test Global Setup It is unlikely that this change will affect you, no action is required if your tests keep running as they did. We've noticed that in rare cases, the set of tests to be executed was configured in the global setup by means of the environment variables. We also noticed some applications that were post processing the reporters' output in the global teardown. If you are doing one of the two, [learn more](https://togithub.com/microsoft/playwright/issues/12018) ##### Locator Updates ##### Locator now supports a `has` option that makes sure it contains another locator inside: ```js await page.locator('article', { has: page.locator('.highlight'), }).locator('button').click(); ``` The snippet above will select article that has highlight in it and will press the button in it. Read more in [locator documentation](https://playwright.dev/docs/api/class-locator#locator-locator-option-has) ##### Other Updates - New [`method: Locator.page`](https://playwright.dev/docs/api/class-locator#locator-page) - [`method: Page.screenshot`](https://playwright.dev/docs/api/class-page#page-screenshot) and [`method: Locator.screenshot`](https://playwright.dev/docs/api/class-locator#locator-screenshot) now automatically hides blinking caret - Playwright Codegen now generates locators and frame locators - New option `url` in [`testConfig.webServer`](https://playwright.dev/docs/api/class-testconfig#test-config-web-server) to ensure your web server is ready before running the tests - New [`property: TestInfo.errors`](https://playwright.dev/docs/api/class-testinfo#test-info-errors) and [`property: TestResult.errors`](https://playwright.dev/docs/api/class-testresult#test-result-errors) that contain all failed assertions and soft assertions. #### Browser Versions - Chromium 100.0.4863.0 - Mozilla Firefox 96.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 98 - Microsoft Edge 98 *** ### [`v1.18.1`](https://togithub.com/Microsoft/playwright/releases/v1.18.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.18.0...v1.18.1) #### Highlights This patch includes improvements to the TypeScript support and the following bug fixes: [https://github.com/microsoft/playwright/issues/11550](https://togithub.com/microsoft/playwright/issues/11550) - \[REGRESSION]: Errors inside route handler does not lead to unhandled rejections anymore[https://github.com/microsoft/playwright/issues/11552](https://togithub.com/microsoft/playwright/issues/11552)2 - \[BUG] Could not resolve "C:\repo\framework\utils" in file C:\repo\tests\test.ts. #### Browser Versions - Chromium 99.0.4812.0 - Mozilla Firefox 95.0 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 97 - Microsoft Edge 97 ### [`v1.18.0`](https://togithub.com/Microsoft/playwright/releases/v1.18.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.17.2...v1.18.0) #### Locator Improvements - [`locator.dragTo(locator)`][locator.dragTo(locator)] - [`expect(locator).toBeChecked({ checked })`][expect(locator).toBeChecked({ checked })] - Each locator can now be optionally filtered by the text it contains: ```js await page.locator('li', { hasText: 'my item' }).locator('button').click(); ``` Read more in [locator documentation]. #### Testing API improvements - [`expect(response).toBeOK()`][expect(response).toBeOK()] - [`testInfo.attach()`][testInfo.attach()] - [`test.info()`][test.info()] #### Improved TypeScript Support 1. Playwright Test now respects `tsconfig.json`'s [`baseUrl`](https://www.typescriptlang.org/tsconfig#baseUrl) and [`paths`](https://www.typescriptlang.org/tsconfig#paths), so you can use aliases 2. There is a new environment variable `PW_EXPERIMENTAL_TS_ESM` that allows importing ESM modules in your TS code, without the need for the compile step. Don't forget the `.js` suffix when you are importing your esm modules. Run your tests as follows: ```bash npm i --save-dev @playwright/test@1.18.0 PW_EXPERIMENTAL_TS_ESM=1 npx playwright test ``` #### Create Playwright The `npm init playwright` command is now generally available for your use: ```sh ### Run from your project's root directory npm init playwright ### Or create a new project npm init playwright new-project ``` This will scaffold everything needed to get started with Playwright Test: configuration file, optionally add examples, a GitHub Action workflow and a first test `example.spec.ts`. #### New APIs & changes - new [`testCase.repeatEachIndex`][testCase.repeatEachIndex] API - [`acceptDownloads`][acceptDownloads] option now defaults to `true` #### Breaking change: custom config options Custom config options are a convenient way to parametrize projects with different values. Learn more in the [parametrization guide]. Previously, any fixture introduced through [`test.extend`][test.extend] could be overridden in the [`testProject.use`][testProject.use] config section. For example, ```js // WRONG: THIS SNIPPET DOES NOT WORK SINCE v1.18. // fixtures.js const test = base.extend({ myParameter: 'default', }); // playwright.config.js module.exports = { use: { myParameter: 'value', }, }; ``` The proper way to make a fixture parametrized in the config file is to specify `option: true` when defining the fixture. For example, ```js // CORRECT: THIS SNIPPET WORKS SINCE v1.18. // fixtures.js const test = base.extend({ // Fixtures marked as "option: true" will get a value specified in the config, // or fallback to the default value. myParameter: ['default', { option: true }], }); // playwright.config.js module.exports = { use: { myParameter: 'value', }, }; ``` #### Browser Versions - Chromium 99.0.4812.0 - Mozilla Firefox 95.0 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 97 - Microsoft Edge 97 *** [`locator.dragTo(locator)`]: https://playwright.dev/docs/api/class-locator#locator-drag-to [`expect(locator).toBeChecked({ checked })`]: https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-checked [locator documentation]: https://playwright.dev/docs/api/class-locator#locator-locator-option-has-text [`expect(response).toBeOK()`]: https://playwright.dev/docs/api/class-apiresponseassertions [`testInfo.attach()`]: https://playwright.dev/docs/api/class-testinfo#test-info-attach [`test.info()`]: https://playwright.dev/docs/api/class-test#test-info [`testCase.repeatEachIndex`]: https://playwright.dev/docs/api/class-testcase#test-case-repeat-each-index [parametrization guide]: https://playwright.dev/docs/test-parameterize#parameterized-projects [`acceptDownloads`]: https://playwright.dev/docs/api/class-browser#browser-new-context-option-accept-downloads [`test.extend`]: https://playwright.dev/docs/api/class-test#test-extend [`testProject.use`]: https://playwright.dev/docs/api/class-testproject#test-project-use (`1.18.0-beta-1642620709000`) ### [`v1.17.2`](https://togithub.com/Microsoft/playwright/releases/v1.17.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.17.1...v1.17.2) ##### Bugfixes [#11274](https://togithub.com/Microsoft/playwright/issues/11274) - fix: pin colors to 1.4.0 [#11228](https://togithub.com/Microsoft/playwright/issues/11228) - fix(click): don't fail on stale context while click ### [`v1.17.1`](https://togithub.com/Microsoft/playwright/releases/v1.17.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.17.0...v1.17.1) ##### Highlights This patch includes bug fixes for the following issues: [https://github.com/microsoft/playwright/issues/10638](https://togithub.com/microsoft/playwright/issues/10638) - \[BUG] Locator.click -> subtree intercepts pointer events since version 1.17.0[https://github.com/microsoft/playwright/issues/10632](https://togithub.com/microsoft/playwright/issues/10632)2 - \[BUG] Playwright 1.17.0 -> After clicking the element - I get an error that click action was faile[https://github.com/microsoft/playwright/issues/10627](https://togithub.com/microsoft/playwright/issues/10627)27 - \[REGRESSION]: Can no longer click Material UI select b[https://github.com/microsoft/playwright/issues/10620](https://togithub.com/microsoft/playwright/issues/10620)620 - \[BUG] trailing zero width whitespace fails toHaveText ##### Browser Versions - Chromium 98.0.4695.0 - Mozilla Firefox 94.0.1 - WebKit 15.4 This version of Playwright was also tested against the following stable channels: - Google Chrome 96 - Microsoft Edge 96 *** (1.17.1) ### [`v1.17.0`](https://togithub.com/Microsoft/playwright/releases/v1.17.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.16.3...v1.17.0) ##### Frame Locators Playwright 1.17 introduces [frame locators] - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions. ![Graphics](https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png) Frame locators can be created with either [`page.frameLocator(selector)`][page.frameLocator(selector)] or [`locator.frameLocator(selector)`][locator.frameLocator(selector)] method. ```js const locator = page.frameLocator('#my-iframe').locator('text=Submit'); await locator.click(); ``` Read more at [our documentation](https://playwright.dev/docs/next/api/class-framelocator). ##### Trace Viewer Update Playwright Trace Viewer is now **available online** at https://trace.playwright.dev! Just drag-and-drop your `trace.zip` file to inspect its contents. > **NOTE**: trace files are not uploaded anywhere; [trace.playwright.dev](https://trace.playwright.dev) is a [progressive web application](https://web.dev/progressive-web-apps/) that processes traces locally. - Playwright Test traces now include sources by default (these could be turned off with tracing option) - Trace Viewer now shows test name - New trace metadata tab with browser details - Snapshots now have URL bar ![image](https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png) ##### HTML Report Update - HTML report now supports dynamic filtering - Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment. ![image](https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png) ##### Ubuntu ARM64 support + more - Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi. - You can now use Playwright to install stable version of Edge on Linux: ```bash npx playwright install msedge ``` ##### New APIs - Tracing now supports a [`'title'`](https://playwright.dev/docs/next/api/class-tracing#tracing-start-option-title) option - Page navigations support a new [`'commit'`](https://playwright.dev/docs/next/api/class-page#page-goto) waiting option - HTML reporter got [new configuration options](https://playwright.dev/docs/next/test-reporters#html-reporter) - [`testConfig.snapshotDir` option](https://playwright.dev/docs/next/api/class-testconfig#test-config-snapshot-dir) - [`testInfo.parallelIndex`](https://playwright.dev/docs/next/api/class-testinfo#test-info-parallel-index) - [`testInfo.titlePath`](https://playwright.dev/docs/next/api/class-testinfo#test-info-title-path) - [`testOptions.trace`](https://playwright.dev/docs/next/api/class-testoptions#test-options-trace) has new options - [`expect.toMatchSnapshot`](https://playwright.dev/docs/next/test-assertions#expectvaluetomatchsnapshotname-options) supports subdirectories - [`reporter.printsToStdio()`](https://playwright.dev/docs/next/api/class-reporter#reporter-prints-to-stdio) ##### Browser Versions - Chromium 98.0.4695.0 - Mozilla Firefox 94.0.1 - WebKit 15.4 This version was also tested against the following stable channels: - Google Chrome 96 - Microsoft Edge 96 *** [frame locators]: https://playwright.dev/docs/next/api/class-framelocator [`page.frameLocator(selector)`]: https://playwright.dev/docs/next/api/class-page#page-frame-locator [`locator.frameLocator(selector)`]: https://playwright.dev/docs/next/api/class-locator#locator-frame-locator ### [`v1.16.3`](https://togithub.com/Microsoft/playwright/releases/v1.16.3) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.16.2...v1.16.3) #### Highlights This patch includes bug fixes for the following issues: [https://github.com/microsoft/playwright/issues/9849](https://togithub.com/microsoft/playwright/issues/9849) - \[BUG]: toHaveCount fails with serialization error in 1.16 when elements do not yet exists[https://github.com/microsoft/playwright/issues/9897](https://togithub.com/microsoft/playwright/issues/9897)7 - \[Bug]: TraceViewer doesn't show action[https://github.com/microsoft/playwright/issues/9902](https://togithub.com/microsoft/playwright/issues/9902)02 - \[BUG] Warn if the html-report gets opened with file:// #### Browser Versions - Chromium 97.0.4666.0 - Mozilla Firefox 93.0 - WebKit 15.4 This version of Playwright was also tested against the following stable channels: - Google Chrome 94 - Microsoft Edge 94 *** (1.16.3-1635814179000) ### [`v1.16.2`](https://togithub.com/Microsoft/playwright/releases/v1.16.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.16.1...v1.16.2) #### Highlights This patch includes bug fixes for the following issues: [https://github.com/microsoft/playwright/issues/7818](https://togithub.com/microsoft/playwright/issues/7818) - \[Bug]: dedup snapshot CSS images[https://github.com/microsoft/playwright/issues/9741](https://togithub.com/microsoft/playwright/issues/9741)1 - \[BUG] Error while an attempt to install Playwright in CI -> Failed at the playwright@1.16.1 install scrip[https://github.com/microsoft/playwright/issues/9756](https://togithub.com/microsoft/playwright/issues/9756)56 - \[Regression] Page.screenshot does not work inside Docker with BrowserServ[https://github.com/microsoft/playwright/issues/9759](https://togithub.com/microsoft/playwright/issues/9759)759 - \[BUG] 1.16.x the package.json is not export anym[https://github.com/microsoft/playwright/issues/9760](https://togithub.com/microsoft/playwright/issues/9760)9760 - \[BUG] snapshot updating causes failures for all tries except the [https://github.com/microsoft/playwright/issues/9768](https://togithub.com/microsoft/playwright/issues/9768)/9768 - \[BUG] ignoreHTTPSErrors not working on page.request #### Browser Versions - Chromium 97.0.4666.0 - Mozilla Firefox 93.0 - WebKit 15.4 This version of Playwright was also tested against the following stable channels: - Google Chrome 94 - Microsoft Edge 94 *** (1.16.2-1635322350000) ### [`v1.16.1`](https://togithub.com/Microsoft/playwright/releases/v1.16.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.16.0...v1.16.1) #### Highlights This patch includes bug fixes for the following issues: [https://github.com/microsoft/playwright/issues/9688](https://togithub.com/microsoft/playwright/issues/9688) - \[REGRESSION]: toHaveCount does not work anymore with 0 elements[https://github.com/microsoft/playwright/issues/9692](https://togithub.com/microsoft/playwright/issues/9692)2 - \[BUG] HTML report shows locator.\_withElement for locator.evaluate #### Browser Versions - Chromium 97.0.4666.0 - Mozilla Firefox 93.0 - WebKit 15.4 This version of Playwright was also tested against the following stable channels: - Google Chrome 94 - Microsoft Edge 94 *** (1.16.0-1634781227000) ### [`v1.16.0`](https://togithub.com/Microsoft/playwright/releases/v1.16.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.15.2...v1.16.0) #### π Playwright Test ##### API Testing Playwright 1.16 introduces new [API Testing] that lets you send requests to the server directly from Node.js! Now you can: - test your server API - prepare server side state before visiting the web application in a test - validate server side post-conditions after running some actions in the browser To do a request on behalf of Playwright's Page, use **new [`page.request`][page.request] API**: ```ts import { test, expect } from '@playwright/test'; test('context fetch', async ({ page }) => { // Do a GET request on behalf of page const response = await page.request.get('http://example.com/foo.json'); // ... }); ``` To do a stand-alone request from node.js to an API endpoint, use **new [`request` fixture][request fixture]**: ```ts import { test, expect } from '@playwright/test'; test('context fetch', async ({ request }) => { // Do a GET request on behalf of page const response = await request.get('http://example.com/foo.json'); // ... }); ``` Read more about it in our [API testing guide]. ##### Response Interception It is now possible to do response interception by combining [API Testing] with [request interception]. For example, we can blur all the images on the page: ```ts import { test, expect } from '@playwright/test'; import jimp from 'jimp'; // image processing library test('response interception', async ({ page }) => { await page.route('**/*.jpeg', async route => { const response = await page._request.fetch(route.request()); const image = await jimp.read(await response.body()); await image.blur(5); route.fulfill({ response, body: await image.getBufferAsync('image/jpeg'), }); }); const response = await page.goto('https://playwright.dev'); expect(response.status()).toBe(200); }); ``` Read more about [response interception]. ##### New HTML reporter Try it out new HTML reporter with either `--reporter=html` or a `reporter` entry in `playwright.config.ts` file: ```bash $ npx playwright test --reporter=html ``` The HTML reporter has all the information about tests and their failures, including surfacing trace and image artifacts. ![html reporter](https://user-images.githubusercontent.com/746130/138324311-94e68b39-b51a-4776-a446-f60037a77f32.png) Read more about [our reporters]. #### π Playwright Library ##### locator.waitFor Wait for a locator to resolve to a single element with a given state. Defaults to the `state: 'visible'`. Comes especially handy when working with lists: ```ts import { test, expect } from '@playwright/test'; test('context fetch', async ({ page }) => { const completeness = page.locator('text=Success'); await completeness.waitFor(); expect(await page.screenshot()).toMatchSnapshot('screen.png'); }); ``` Read more about [`locator.waitFor()`][locator.waitFor()]. #### π Playwright Trace Viewer - web-first assertions inside trace viewer - run trace viewer with `npx playwright show-trace` and drop trace files to the trace viewer PWA - API testing is integrated with trace viewer - better visual attribution of action targets Read more about [Trace Viewer]. #### Browser Versions - Chromium 97.0.4666.0 - Mozilla Firefox 93.0 - WebKit 15.4 This version of Playwright was also tested against the following stable channels: - Google Chrome 94 - Microsoft Edge 94 *** (1.16.0-1634781227000) [API Testing]: https://playwright.dev/docs/next/api/class-apirequestcontext [`page.request`]: https://playwright.dev/docs/next/api/class-page#page-request [`request` fixture]: https://playwright.dev/docs/next/api/class-fixtures#fixtures-request [API testing guide]: https://playwright.dev/docs/next/test-api-testing [Trace Viewer]: https://playwright.dev/docs/next/trace-viewer [Docker integration]: https://playwright.dev/docs/next/docker [`locator.waitFor()`]: https://playwright.dev/docs/next/api/class-locator#locator-wait-for [our reporters]: https://playwright.dev/docs/next/test-reporters#html-reporter [response interception]: https://playwright.dev/docs/next/network#modify-responses [request interception]: https://playwright.dev/docs/next/api/class-page#page-route ### [`v1.15.2`](https://togithub.com/Microsoft/playwright/releases/v1.15.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.15.1...v1.15.2) #### Highlights This patch includes bug fixes for the following issues: [https://github.com/microsoft/playwright/issues/9261](https://togithub.com/microsoft/playwright/issues/9261) - \[BUG] npm init playwright fails on path spaces[https://github.com/microsoft/playwright/issues/9298](https://togithub.com/microsoft/playwright/issues/9298)8 - \[Question]: Should new Headers methods work in RouteAsync ? #### Browser Versions - Chromium 96.0.4641.0 - Mozilla Firefox 92.0 - WebKit 15.0 This version of Playwright was also tested against the following stable channels: - Google Chrome 93 - Microsoft Edge 93 *** 1.15.2-1633455481000 ### [`v1.15.1`](https://togithub.com/Microsoft/playwright/releases/v1.15.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.15.0...v1.15.1) #### Highlights This patch includes bug fixes for the following issues: [#9065](https://togithub.com/Microsoft/playwright/issues/9065) - \[BUG] browser(webkit): disable COOP support [#9092](https://togithub.com/Microsoft/playwright/issues/9092) - \[BUG] browser(webkit): fix text padding [#9048](https://togithub.com/Microsoft/playwright/issues/9048) - \[BUG] fix(test-runner): toHaveURL respect baseURL [#8955](https://togithub.com/Microsoft/playwright/issues/8955) - \[BUG] fix(inspector): stop on all snapshottable actions [#8921](https://togithub.com/Microsoft/playwright/issues/8921) - \[BUG] fix(test runner): after hooks step should not be nested [#8975](https://togithub.com/Microsoft/playwright/issues/8975) - \[BUG] feat(fetch): support form data and json encodings [#9071](https://togithub.com/Microsoft/playwright/issues/9071) - \[BUG] fix(fetch): be compatible with a 0 timeout [#8999](https://togithub.com/Microsoft/playwright/issues/8999) - \[BUG] fix: do not dedup header values [#9038](https://togithub.com/Microsoft/playwright/issues/9038) - \[BUG] fix: restore support for slowmo connect option #### Browser Versions - Chromium 96.0.4641.0 - Mozilla Firefox 92.0 - WebKit 15.0 This version of Playwright was also tested against the following stable channels: - Google Chrome 93 - Microsoft Edge 93 *** 1.15.0-1633020276000 ### [`v1.15.0`](https://togithub.com/Microsoft/playwright/releases/v1.15.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.14.1...v1.15.0) ##### π Playwright Library ##### π±οΈ Mouse Wheel By using [`Page.mouse.wheel`](https://playwright.dev/docs/api/class-mouse#mouse-wheel) you are now able to scroll vertically or horizontally. ##### π New Headers API Previously it was not possible to get multiple header values of a response. This is now possible and additional helper functions are available: - [Request.allHeaders()](https://playwright.dev/docs/api/class-request#request-all-headers) - [Request.headersArray()](https://playwright.dev/docs/api/class-request#request-headers-array) - [Request.headerValue(name: string)](https://playwright.dev/docs/api/class-request#request-header-value) - [Response.allHeaders()](https://playwright.dev/docs/api/class-response#response-all-headers) - [Response.headersArray()](https://playwright.dev/docs/api/class-response#response-headers-array) - [Response.headerValue(name: string)](https://playwright.dev/docs/api/class-response#response-header-value) - [Response.headerValues(name: string)](https://playwright.dev/docs/api/class-response/#response-header-values) ##### π Forced-Colors emulation Its now possible to emulate the `forced-colors` CSS media feature by passing it in the [context options](https://playwright.dev/docs/api/class-browser#browser-new-context-option-forced-colors) or calling [Page.emulateMedia()](https://playwright.dev/docs/api/class-page#page-emulate-media). ##### New APIs - [Page.route()](https://playwright.dev/docs/api/class-page#page-route) accepts new `times` option to specify how many times this route should be matched. - [Page.setChecked(selector: string, checked: boolean)](https://playwright.dev/docs/api/class-page#page-set-checked) and [Locator.setChecked(selector: string, checked: boolean)](https://playwright.dev/docs/api/class-locator#locator-set-checked) was introduced to set the checked state of a checkbox. - [Request.sizes()](https://playwright.dev/docs/api/class-request#request-sizes) Returns resource size information for given http request. - [BrowserContext.tracing.startChunk()](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) - Start a new trace chunk. - [BrowserContext.tracing.stopChunk()](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk) - Stops a new trace chunk. ##### π Playwright Test ##### π€ `test.parallel()` run tests in the same file in parallel ```ts test.describe.parallel('group', () => { test('runs in parallel 1', async ({ page }) => { }); test('runs in parallel 2', async ({ page }) => { }); }); ``` By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now run them in parallel with [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel). ##### π Add `--debug` CLI flag By using `npx playwright test --debug` it will enable the [Playwright Inspector](https://playwright.dev/docs/debug#playwright-inspector) for you to debug your tests. ##### Browser Versions - Chromium 96.0.4641.0 - Mozilla Firefox 92.0 - WebKit 15.0 This version of Playwright was also tested against the following stable channels: - Google Chrome 93 - Microsoft Edge 93 ### [`v1.14.1`](https://togithub.com/Microsoft/playwright/releases/v1.14.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.14.0...v1.14.1) #### Highlights This patch includes bug fixes for the following issues: [#8287](https://togithub.com/Microsoft/playwright/issues/8287) - \[BUG] webkit crashes intermittently: "file data stream has an unexpected number of bytes" [#8281](https://togithub.com/Microsoft/playwright/issues/8281) - \[BUG] HTML report crashes if diff snapshot does not exists [#8230](https://togithub.com/Microsoft/playwright/issues/8230) - Using React Selectors with multiple React trees [#8366](https://togithub.com/Microsoft/playwright/issues/8366) - \[BUG] Mark timeout in isVisible as deprecated and noop #### Browser Versions - Chromium 94.0.4595.0 - Mozilla Firefox 91.0 - WebKit 15.0 This version of Playwright was also tested against the following stable channels: - Google Chrome 92 - Microsoft Edge 92 ### [`v1.14.0`](https://togithub.com/Microsoft/playwright/releases/v1.14.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.13.1...v1.14.0) ### π Playwright Library ##### β‘οΈ New "strict" mode Selector ambiguity is a common problem in automation testing. **"strict" mode** ensures that your selector points to a single element and throws otherwise. Pass `strict: true` into your action calls to opt in. ```js // This will throw if you have more than one button! await page.click('button', { strict: true }); ``` ##### π New [**Locators API**](https://playwright.dev/docs/api/class-locator) Locator represents a view to the element(s) on the page. It captures the logic sufficient to retrieve the element at any given moment. The difference between the [Locator](https://playwright.dev/docs/api/class-locator) and [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is that the latter points to a particular element, while [Locator](https://playwright.dev/docs/api/class-locator) captures the logic of how to retrieve that element. Also, locators are **"strict" by default**! ```js const locator = page.locator('button'); await locator.click(); ``` Learn more in the [documentation](https://playwright.dev/docs/api/class-locator). ##### 𧩠Experimental [**React**](https://playwright.dev/docs/selectors#react-selectors) and [**Vue**](https://playwright.dev/docs/selectors#vue-selectors) selector engines React and Vue selectors allow selecting elements by its component name and/or property values. The syntax is very similar to [attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and supports all attribute selector operators. ```js await page.click('_react=SubmitButton[enabled=true]'); await page.click('_vue=submit-button[enabled=true]'); ``` Learn more in the [react selectors documentation](https://playwright.dev/docs/selectors#react-selectors) and the [vue selectors documentation](https://playwright.dev/docs/selectors#vue-selectors). ##### β¨ New [**`nth`**](https://playwright.dev/docs/selectors#n-th-element-selector) and [**`visible`**](https://playwright.dev/docs/selectors#selecting-visible-elements) selector engines - [`nth`](https://playwright.dev/docs/selectors#n-th-element-selector) selector engine is equivalent to the `:nth-match` pseudo class, but could be combined with other selector engines. - [`visible`](https://playwright.dev/docs/selectors#selecting-visible-elements) selector engine is equivalent to the `:visible` pseudo class, but could be combined with other selector engines. ```js // select the first button among all buttons await button.click('button >> nth=0'); // or if you are using locators, you can use first(), nth() and last() await page.locator('button').first().click(); // click a visible button await button.click('button >> visible=true'); ``` ### π Playwright Test ##### β Web-First Assertions `expect` now supports lots of new web-first assertions. Consider the following example: ```js await expect(page.locator('.status')).toHaveText('Submitted'); ``` Playwright Test will be re-testing the node with the selector `.status` until fetched Node has the `"Submitted"` text. It will be re-fetching the node and checking it over and over, until the condition is met or until the timeout is reached. You can either pass this timeout or configure it once via the [`testProject.expect`](https://playwright.dev/docs/api/class-testproject/#test-project-expect) value in test config. By default, the timeout for assertions is not set, so it'll wait forever, until the whole test times out. List of all new assertions: - [`expect(locator).toBeChecked()`](https://playwright.dev/docs/test-assertions#expectlocatortobechecked) - [`expect(locator).toBeDisabled()`](https://playwright.dev/docs/test-assertions#expectlocatortobedisabled) - [`expect(locator).toBeEditable()`](https://playwright.dev/docs/test-assertions#expectlocatortobeeditable) - [`expect(locator).toBeEmpty()`](https://playwright.dev/docs/test-assertions#expectlocatortobeempty) - [`expect(locator).toBeEnabled()`](https://playwright.dev/docs/test-assertions#expectlocatortobeenabled) - [`expect(locator).toBeFocused()`](https://playwright.dev/docs/test-assertions#expectlocatortobefocused) - [`expect(locator).toBeHidden()`](https://playwright.dev/docs/test-assertions#expectlocatortobehidden) - [`expect(locator).toBeVisible()`](https://playwright.dev/docs/test-assertions#expectlocatortobevisible) - [`expect(locator).toContainText(text, options?)`](https://playwright.dev/docs/test-assertions#expectlocatortocontaintexttext-options) - [`expect(locator).toHaveAttribute(name, value)`](https://playwright.dev/docs/test-assertions#expectlocatortohaveattributename-value) - [`expect(locator).toHaveClass(expected)`](https://playwright.dev/docs/test-assertions#expectlocatortohaveclassexpected) - [`expect(locator).toHaveCount(count)`](https://playwright.dev/docs/test-assertions#expectlocatortohavecountcount) - [`expect(locator).toHaveCSS(name, value)`](https://playwright.dev/docs/test-assertions#expectlocatortohavecssname-value) - [`expect(locator).toHaveId(id)`](https://playwright.dev/docs/test-assertions#expectlocatortohaveidid) - [`expect(locator).toHaveJSProperty(name, value)`](https://playwright.dev/docs/test-assertions#expectlocatortohavejspropertyname-value) - [`expect(locator).toHaveText(expected, options)`](https://playwright.dev/docs/test-assertions#expectlocatortohavetextexpected-options) - [`expect(page).toHaveTitle(title)`](https://playwright.dev/docs/test-assertions#expectpagetohavetitletitle) - [`expect(page).toHaveURL(url)`](https://playwright.dev/docs/test-assertions#expectpagetohaveurlurl) - [`expect(locator).toHaveValue(value)`](https://playwright.dev/docs/test-assertions#expectlocatortohavevaluevalue) ##### β Serial mode with [`describe.serial`](https://playwright.dev/docs/api/class-test#test-describe-serial) Declares a group of tests that should always be run serially. If one of the tests fails, all subsequent tests are skipped. All tests in a group are retried together. ```ts test.describe.serial('group', () => { test('runs first', async ({ page }) => { /* ... */ }); test('runs second', async ({ page }) => { /* ... */ }); }); ``` Learn more in the [documentation](https://playwright.dev/docs/api/class-test#test-describe-serial). ##### πΎ Steps API with [`test.step`](https://playwright.dev/docs/api/class-test#test-step) Split long tests into multiple steps using `test.step()` API: ```ts import { test, expect } from '@playwright/test'; test('test', async ({ page }) => { await test.step('Log in', async () => { // ... }); await test.step('news feed', async () => { // ... }); }); ``` Step information is exposed in reporters API. ##### π Launch web server before running tests To launch a server during the tests, use the [`webServer`](https://playwright.dev/docs/test-advanced/#launching-a-development-web-server-during-the-tests) option in the configuration file. The server will wait for a given port to be available before running the tests, and the port will be passed over to Playwright as a [`baseURL`](https://playwright.dev/docs/api/class-fixtures#fixtures-base-url) when creating a context. ```ts // playwright.config.ts import { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { webServer: { command: 'npm run start', // command to launch port: 3000, // port to await for timeout: 120 * 1000, reuseExistingServer: !process.env.CI, }, }; export default config; ``` Learn more in the [documentation](https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests). #### Browser Versions - Chromium 94.0.4595.0 - Mozilla Firefox 91.0 - WebKit 15.0 This version of Playwright was also tested against the following stable channels: - Google Chrome 92 - Microsoft Edge 92 ### [`v1.13.1`](https://togithub.com/Microsoft/playwright/releases/v1.13.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.13.0...v1.13.1) #### Highlights This patch includes bug fixes for the following issues: [#7800](https://togithub.com/Microsoft/playwright/issues/7800) - \[Bug]: empty screen when opening trace.zip [#7785](https://togithub.com/Microsoft/playwright/issues/7785) - \[Bug]: Channel installation requires curl/wget on the system [#7746](https://togithub.com/Microsoft/playwright/issues/7746) - \[Bug]: global use is not working to launch firefox or webkit [#7849](https://togithub.com/Microsoft/playwright/issues/7849) - \[Bug]: Setting the current shard through config uses n+1 instead #### Browser Versions - Chromium 93.0.4576.0 - Mozilla Firefox 90.0 - WebKit 14.2 ### [`v1.13.0`](https://togithub.com/Microsoft/playwright/releases/v1.13.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.12.3...v1.13.0) ### Playwright Test - **β‘οΈ Introducing [Reporter API](https://togithub.com/microsoft/playwright/blob/master/types/testReporter.d.ts)** which is already used to create an [Allure Playwright reporter](https://togithub.com/allure-framework/allure-js/pull/297). - **βΊοΈ New [`baseURL` fixture](https://playwright.dev/docs/next/test-configuration#basic-options)** to support relative paths in tests. ### Playwright - **π Programmatic drag-and-drop support** via the [`page.dragAndDrop()`][page.dragAndDrop()] API. - **π Enhanced HAR** with body sizes for requests and responses. Use via `recordHar` option in [`browser.newContext()`][browser.newContext()]. ### Tools - Playwright Trace Viewer now shows parameters, returned values and `console.log()` calls. - Playwright Inspector can generate Playwright Test tests. ### New and Overhauled Guides - [Intro](https://playwright.dev/docs/next/intro/) - [Authentication](https://playwright.dev/docs/next/auth) - [Chome Extensions](https://playwright.dev/docs/next/chrome-extensions) - [Playwright Test Configuration](https://playwright.dev/docs/next/test-configuration) - [Playwright Test Annotations](https://playwright.dev/docs/next/test-annotations) - [Playwright Test Fixtures](https://playwright.dev/docs/next/test-fixtures) #### Browser Versions - Chromium 93.0.4576.0 - Mozilla Firefox 90.0 - WebKit 14.2 #### New Playwright APIs - new `baseURL` option in [`browser.newContext()`][browser.newContext()] and [`browser.newPage()`][browser.newPage()] - [`response.securityDetails()`][response.securityDetails()] and [`response.serverAddr()`][response.serverAddr()] - [`page.dragAndDrop()`][page.dragAndDrop()] and [`frame.dragAndDrop()`][frame.dragAndDrop()] - [`download.cancel()`][download.cancel()] - [`page.inputValue()`][page.inputValue()], [`frame.inputValue()`][frame.inputValue()] and [`elementHandle.inputValue()`][elementHandle.inputValue()] - new `force` option in [`page.fill()`][page.fill()], [`frame.fill()`][frame.fill()], and [`elementHandle.fill()`][elementHandle.fill()] - new `force` option in [`page.selectOption()`][page.selectOption()], [`frame.selectOption()`][frame.selectOption()], and [`elementHandle.selectOption()`][elementHandle.selectOption()] [`download.cancel()`]: https://playwright.dev/docs/next/api/class-download#download-cancel [`page.fill()`]: https://playwright.dev/docs/next/api/class-page#page-fill [`frame.fill()`]: https://playwright.dev/docs/next/api/class-frame#frame-fill [`elementHandle.fill()`]: https://playwright.dev/docs/next/api/class-elementhandle#elementhandle-fill [`page.inputValue()`]: https://playwright.dev/docs/next/api/class-page#page-input-value [`frame.inputValue()`]: https://playwright.dev/docs/next/api/class-frame#frame-input-value [`elementHandle.inputValue()`]: https://playwright.dev/docs/next/api/class-ElementHandle#elementhandle-input-value [`page.selectOption()`]: https://playwright.dev/docs/next/api/class-page#page-select-option [`frame.selectOption()`]: https://playwright.dev/docs/next/api/class-frame#frame-select-option [`elementHandle.selectOption()`]: https://playwright.dev/docs/next/api/class-elementhandle#elementhandle-select-option [`page.dragAndDrop()`]: https://playwright.dev/docs/next/api/class-page#page-drag-and-drop [`frame.dragAndDrop()`]: https://playwright.dev/docs/next/api/class-frame#frame-drag-and-drop [`response.securityDetails()`]: https://playwright.dev/docs/next/api/class-response#response-security-details [`response.serverAddr()`]: https://playwright.dev/docs/next/api/class-response#response-server-addr [`browser.newContext()`]: https://playwright.dev/docs/next/api/class-browser#browser-new-context [`browser.newPage()`]: https://playwright.dev/docs/next/api/class-browser#browser-new-page ### [`v1.12.3`](https://togithub.com/Microsoft/playwright/releases/v1.12.3) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.12.2...v1.12.3) #### Highlights This patch release includes bug fixes for the following issues: [#7085](https://togithub.com/Microsoft/playwright/issues/7085) - \[BUG] Traceviewer screens are not recorded well when using constructable stylesheets [#7093](https://togithub.com/Microsoft/playwright/issues/7093) - Folder for a test-case is getting generated in test-results even if Test Case Passes when properties are given on Failure [#7099](https://togithub.com/Microsoft/playwright/issues/7099) - \[test-runner] Missing types for the expect library [#7124](https://togithub.com/Microsoft/playwright/issues/7124) - \[Test Runner] config.outputDir must be an absolute path [#7141](https://togithub.com/Microsoft/playwright/issues/7141) - \[Feature] Options for video resolution [#7163](https://togithub.com/Microsoft/playwright/issues/7163) - \[Test runner] artifacts are removed [#7223](https://togithub.com/Microsoft/playwright/issues/7223) - \[BUG] test-runner viewport can't be null [#7284](https://togithub.com/Microsoft/playwright/issues/7284) - \[BUG] incorrect [@playwright/test](https://togithub.com/playwright/test) typings for toMatchSnapshot/toMatchInlineSnapshot/etc [#7304](https://togithub.com/Microsoft/playwright/issues/7304) - \[BUG] Snapshots are not captured if there is an animation at the beginning [#7326](https://togithub.com/Microsoft/playwright/issues/7326) - \[BUG] When PW timeouts, last trace action does not get collected\[BUG] When PW timeouts, last trace action does not get collected #### 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 ### [`v1.12.2`](https://togithub.com/Microsoft/playwright/releases/v1.12.2) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.12.1...v1.12.2) #### Highlights This patch release includes bugfixes for the following issues: - [#7015](https://togithub.com/Microsoft/playwright/issues/7015) - \[BUG] Firefox: strange undefined toJSON property on JS objects - [#7004](https://togithub.com/Microsoft/playwright/issues/7004) - \[test runner] Error: Error while reading global-setup.ts: Cannot find module 'global-setup.ts' - [#7048](https://togithub.com/Microsoft/playwright/issues/7048) - \[BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit - [#7058](https://togithub.com/Microsoft/playwright/issues/7058) - \[BUG] Getting no video frame error for mobile chrome - [#7020](https://togithub.com/Microsoft/playwright/issues/7020) - \[Feature] Codegen should be able to emit [@playwright/test](https://togithub.com/playwright/test) syntax #### 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 ### [`v1.12.1`](https://togithub.com/Microsoft/playwright/releases/v1.12.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.12.0...v1.12.1) #### Highlights This patch includes bug fixes for the following issues: [#6984](https://togithub.com/Microsoft/playwright/issues/6984) - slowMo does not exist in type 'Fixtures<{}, {}, PlaywrightTestOptions, PlaywrightWorkerOptions>' [#6982](https://togithub.com/Microsoft/playwright/issues/6982) - \[trace viewer] srcset sanitization removes space between values, hence breaks the links [#6981](https://togithub.com/Microsoft/playwright/issues/6981) - \[BUG] Getting "Please install [@playwright/test](https://togithub.com/playwright/test) package to use Playwright Test." #### 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 ### [`v1.12.0`](https://togithub.com/Microsoft/playwright/releases/v1.12.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.11.1...v1.12.0) #### β‘οΈ Introducing Playwright Test [Playwright Test](https://playwright.dev/docs/next/test-intro) 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 traces, videos, screenshots and other artifacts on failure. - Infinitely extensible with 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 ``` π Read more in [testrunner documentation](https://playwright.dev/docs/next/test-intro). #### π§ββοΈ Introducing Playwright Trace & TraceViewer [Playwright TraceViewer](https://playwright.dev/docs/next/trace-viewer) 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 - browse network during script execution Traces are recorded using the new [`browserContext.tracing`][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](https://playwright.dev/docs/next/trace-viewer). *** #### 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 [`page.emulateMedia()`][page.emulateMedia()], [`browserType.launchPersistentContext()`][browserType.launchPersistentContext()], [`browser.newContext()`][browser.newContext()] and [`browser.newPage()`][browser.newPage()] - [`browserContext.on('request')`][browserContext.on('request')] - [`browserContext.on('requestfailed')`][browserContext.on('requestfailed')] - [`browserContext.on('requestfinished')`][browserContext.on('requestfinished')] - [`browserContext.on('response')`][browserContext.on('response')] - `tracesDir` option in [`browserType.launch()`][browserType.launch()] and [`browserType.launchPersistentContext()`][browserType.launchPersistentContext()] - new [`browserContext.tracing`][browserContext.tracing] API namespace - new [`download.page()`][download.page()] method - new options in [`electron.launch()`][electron.launch()]: - `acceptDownloads` - `bypassCSP` - `colorScheme` - `extraHTTPHeaders` - `geolocation` - `httpCredentials` [`page.emulateMedia()`]: https://playwright.dev/docs/next/api/class-page#page-emulate-media [`browserType.launchPersistentContext()`]: https://playwright.dev/docs/next/api/class-browsertype#browser-tyConfiguration
π Schedule: At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.