Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency playwright-chromium to v1.20.2 #168

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 19, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
playwright-chromium (source) ^1.7.1 -> 1.20.2 age adoption passing confidence

Release Notes

Microsoft/playwright

v1.20.2

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/13078 - [BUG] Extension required when importing other files with type="module"https://github.com/microsoft/playwright/issues/130999 - [BUG] beforeAll is called before each test (fullyParallelhttps://github.com/microsoft/playwright/issues/1320404 - [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

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/12711 - [REGRESSION] Page.screenshot hangs on some siteshttps://github.com/microsoft/playwright/issues/128077 - [BUG] Cookies get assigned before fulfilling a responshttps://github.com/microsoft/playwright/issues/1281414 - [Question] how to use expect.any in playwrighttps://github.com/microsoft/playwright/issues/12821821 - [BUG] Chromium: Cannot click, element intercepts pointer evehttps://github.com/microsoft/playwright/issues/128362836 - [REGRESSION]: Tests not detected as ES module in vhttps://github.com/microsoft/playwright/issues/1286212862 - [Feature] Allow to use toMatchSnapshot for file formats other than txt (e.g.https://github.com/microsoft/playwright/issues/12887/12887 - [BUG] Locator.count() with _vue selector withttps://github.com/microsoft/playwright/issues/12940es/12940 - [BUG] npm audit - High Severity vulnerability in json5 package forcing to install Playwrighhttps://github.com/microsoft/playwright/issues/12974ues/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

Compare Source

Highlights
  • New options for methods page.screenshot(), locator.screenshot() and elementHandle.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() now supports anonymous snapshots: when snapshot name is missing, Playwright Test will generate one
    automatically:

    expect('Web is Awesome <3').toMatchSnapshot();
  • New maxDiffPixels and maxDiffPixelRatio options for fine-grained screenshot comparison using expect().toMatchSnapshot():

    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.

  • Playwright Test now adds TestConfig.fullyParallel 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.

    // playwright.config.ts
    export default {
      fullyParallel: true,
    };
  • TestProject.grep and TestProject.grepInvert are now configurable per project. For example, you can now
    configure smoke tests project using grep:

    // playwright.config.ts
    export default {
      projects: [
        {
          name: 'smoke tests',
          grep: /@&#8203;smoke/,
        },
      ],
    };
  • Trace Viewer now shows API testing requests.

  • 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

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/12091 - [BUG] playwright 1.19.0 generates more than 1 trace file per testhttps://github.com/microsoft/playwright/issues/121066 - [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

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/12075 - [Question] After update to 1.19 firefox fails to runhttps://github.com/microsoft/playwright/issues/120900 - [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

Compare Source

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.

// 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 as a second argument to the expect and expect.soft functions, for example:

await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();

The error would look like this:

    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:

import { test } from '@&#8203;playwright/test';

test.describe.configure({ mode: 'parallel' });

test('parallel 1', async () => {});
test('parallel 2', async () => {});
⚠️ 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

Locator Updates
Locator now supports a has option that makes sure it contains another locator inside:
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

Other Updates

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

Compare Source

Highlights

This patch includes improvements to the TypeScript support and the following bug fixes:

https://github.com/microsoft/playwright/issues/11550 - [REGRESSION]: Errors inside route handler does not lead to unhandled rejections anymorehttps://github.com/microsoft/playwright/issues/115522 - [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

Compare Source

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:
    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 and 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:
npm i --save-dev @&#8203;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:

### 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,

// 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,

// 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

(1.18.0-beta-1642620709000)

v1.17.2

Compare Source

Bugfixes

#​11274 - fix: pin colors to 1.4.0
#​11228 - fix(click): don't fail on stale context while click

v1.17.1

Compare Source

Highlights

This patch includes bug fixes for the following issues:

https://github.com/microsoft/playwright/issues/10638 - [BUG] Locator.click -> subtree intercepts pointer events since version 1.17.0https://github.com/microsoft/playwright/issues/106322 - [BUG] Playwright 1.17.0 -> After clicking the element - I get an error that click action was failehttps://github.com/microsoft/playwright/issues/1062727 - [REGRESSION]: Can no longer click Material UI select bhttps://github.com/microsoft/playwright/issues/10620620 - [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

Compare Source

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

Frame locators can be created with either [page.frameLocator(selector)][page.frameLocator(selector)] or [locator.frameLocator(selector)][locator.frameLocator(selector)] method.

const locator = page.frameLocator('#my-iframe').locator('text=Submit');
await locator.click();

Read more at our documentation.

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 is a progressive web application 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

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

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:
    npx playwright install msedge
New APIs
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

v1.16.3

Compare Source

Highlights

This patch includes bug fixes for the following issues:

https://github.com/microsoft/playwright/issues/9849 - [BUG]: toHaveCount fails with serialization error in 1.16 when elements do not yet existshttps://github.com/microsoft/playwright/issues/98977 - [Bug]: TraceViewer doesn't show actionhttps://github.com/microsoft/playwright/issues/990202 - [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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

https://github.com/microsoft/playwright/issues/7818 - [Bug]: dedup snapshot CSS imageshttps://github.com/microsoft/playwright/issues/97411 - [BUG] Error while an attempt to install Playwright in CI -> Failed at the playwright@1.16.1 install scriphttps://github.com/microsoft/playwright/issues/975656 - [Regression] Page.screenshot does not work inside Docker with BrowserServhttps://github.com/microsoft/playwright/issues/9759759 - [BUG] 1.16.x the package.json is not export anymhttps://github.com/microsoft/playwright/issues/97609760 - [BUG] snapshot updating causes failures for all tries except the https://github.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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

https://github.com/microsoft/playwright/issues/9688 - [REGRESSION]: toHaveCount does not work anymore with 0 elementshttps://github.com/microsoft/playwright/issues/96922 - [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

Compare Source

🎭 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:

import { test, expect } from '@&#8203;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]:

import { test, expect } from '@&#8203;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:

import { test, expect } from '@&#8203;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:

$ 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

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:

import { test, expect } from '@&#8203;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)

v1.15.2

Compare Source

Highlights

This patch includes bug fixes for the following issues:

https://github.com/microsoft/playwright/issues/9261 - [BUG] npm init playwright fails on path spaceshttps://github.com/microsoft/playwright/issues/92988 - [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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

#​9065 - [BUG] browser(webkit): disable COOP support
#​9092 - [BUG] browser(webkit): fix text padding
#​9048 - [BUG] fix(test-runner): toHaveURL respect baseURL
#​8955 - [BUG] fix(inspector): stop on all snapshottable actions
#​8921 - [BUG] fix(test runner): after hooks step should not be nested
#​8975 - [BUG] feat(fetch): support form data and json encodings
#​9071 - [BUG] fix(fetch): be compatible with a 0 timeout
#​8999 - [BUG] fix: do not dedup header values
#​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

Compare Source

🎭 Playwright Library
🖱️ Mouse Wheel

By using Page.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:

🌈 Forced-Colors emulation

Its now possible to emulate the forced-colors CSS media feature by passing it in the context options or calling Page.emulateMedia().

New APIs
🎭 Playwright Test
🤝 test.parallel() run tests in the same file in parallel
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).

🛠 Add --debug CLI flag

By using npx playwright test --debug it will enable the 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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

#​8287 - [BUG] webkit crashes intermittently: "file data stream has an unexpected number of bytes"
#​8281 - [BUG] HTML report crashes if diff snapshot does not exists
#​8230 - Using React Selectors with multiple React trees
#​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

Compare Source

🎭 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.

// This will throw if you have more than one button!
await page.click('button', { strict: true });
📍 New Locators API

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 and ElementHandle is that the latter points to a particular element, while Locator captures the logic of how to retrieve that element.

Also, locators are "strict" by default!

const locator = page.locator('button');
await locator.click();

Learn more in the documentation.

🧩 Experimental React and Vue 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 and supports all attribute selector operators.

await page.click('_react=SubmitButton[enabled=true]');
await page.click('_vue=submit-button[enabled=true]');

Learn more in the react selectors documentation and the vue selectors documentation.

✨ New nth and visible selector engines
  • nth selector engine is equivalent to the :nth-match pseudo class, but could be combined with other selector engines.
  • visible selector engine is equivalent to the :visible pseudo class, but could be combined with other selector engines.
// 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:

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 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:

⛓ Serial mode with 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.

test.describe.serial('group', () => {
  test('runs first', async ({ page }) => { /* ... */ });
  test('runs second', async ({ page }) => { /* ... */ });
});

Learn more in the documentation.

🐾 Steps API with test.step

Split long tests into multiple steps using test.step() API:

import { test, expect } from '@&#8203;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 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 when creating a context.

// playwright.config.ts
import { PlaywrightTestConfig } from '@&#8203;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.

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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

#​7800 - [Bug]: empty screen when opening trace.zip
#​7785 - [Bug]: Channel installation requires curl/wget on the system
#​7746 - [Bug]: global use is not working to launch firefox or webkit
#​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

Compare Source

Playwright Test

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

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()]

v1.12.3

Compare Source

Highlights

This patch release includes bug fixes for the following issues:

#​7085 - [BUG] Traceviewer screens are not recorded well when using constructable stylesheets
#​7093 - Folder for a test-case is getting generated in test-results even if Test Case Passes when properties are given on Failure
#​7099 - [test-runner] Missing types for the expect library
#​7124 - [Test Runner] config.outputDir must be an absolute path
#​7141 - [Feature] Options for video resolution
#​7163 - [Test runner] artifacts are removed
#​7223 - [BUG] test-runner viewport can't be null
#​7284 - [BUG] incorrect @​playwright/test typings for toMatchSnapshot/toMatchInlineSnapshot/etc
#​7304 - [BUG] Snapshots are not captured if there is an animation at the beginning
#​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

Compare Source

Highlights

This patch release includes bugfixes for the following issues:

  • #​7015 - [BUG] Firefox: strange undefined toJSON property on JS objects
  • #​7004 - [test runner] Error: Error while reading global-setup.ts: Cannot find module 'global-setup.ts'
  • #​7048 - [BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit
  • #​7058 - [BUG] Getting no video frame error for mobile chrome
  • #​7020 - [Feature] Codegen should be able to emit @​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

Compare Source

Highlights

This patch includes bug fixes for the following issues:

#​6984 - slowMo does not exist in type 'Fixtures<{}, {}, PlaywrightTestOptions, PlaywrightWorkerOptions>'
#​6982 - [trace viewer] srcset sanitization removes space between values, hence breaks the links
#​6981 - [BUG] Getting "Please install @​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

Compare Source

⚡️ Introducing Playwright Test

Playwright Test 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:

npm i -D @&#8203;playwright/test

Simple test tests/foo.spec.ts:

import { test, expect } from '@&#8203;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:

npx playwright test

👉 Read more in testrunner documentation.

🧟‍♂️ Introducing Playwright Trace & TraceViewer

Playwright TraceViewer 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:

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:

npx playwright show-trace trace.zip

That will open the following GUI:

image

👉 Read more in trace viewer documentation.


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

Configuration

📅 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.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from cc1a366 to 8c8280b Compare May 7, 2021 14:40
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.10.0 Update dependency playwright-chromium to ^1.10.0 May 7, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 8c8280b to 0cb5a59 Compare May 11, 2021 00:31
@renovate renovate bot changed the title Update dependency playwright-chromium to ^1.10.0 Update dependency playwright-chromium to ^1.11.0 May 11, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 0cb5a59 to 3f13256 Compare May 14, 2021 09:55
@renovate renovate bot changed the title Update dependency playwright-chromium to ^1.11.0 Update dependency playwright-chromium to v1.11.0 May 14, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 3f13256 to 0cc5fbe Compare May 20, 2021 21:34
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.11.0 Update dependency playwright-chromium to v1.11.1 May 20, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 0cc5fbe to f182c5b Compare June 16, 2021 14:07
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.11.1 Update dependency playwright-chromium to v1.12.2 Jun 16, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from f182c5b to 21fd15c Compare October 20, 2021 05:29
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.12.2 Update dependency playwright-chromium to v1.15.2 Oct 20, 2021
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 21fd15c to 72b0a89 Compare March 7, 2022 10:02
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.15.2 Update dependency playwright-chromium to v1.19.2 Mar 7, 2022
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 72b0a89 to 8275824 Compare March 26, 2022 14:27
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.19.2 Update dependency playwright-chromium to v1.20.1 Mar 26, 2022
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from 8275824 to 781b420 Compare April 4, 2022 09:00
@renovate renovate bot changed the title Update dependency playwright-chromium to v1.20.1 Update dependency playwright-chromium to v1.20.2 Apr 4, 2022
@hgwood
Copy link
Contributor

hgwood commented Apr 4, 2022

This new version of playwright is tested against Chromium 99 and 101. Chromium should be updated first.

@hgwood
Copy link
Contributor

hgwood commented Apr 5, 2022

Since we're Chromium v100 right now, playwright 1.19 seems more reasonable than 1.20. I'll make another PR.

@hgwood hgwood closed this Apr 5, 2022
@hgwood hgwood deleted the renovate/playwright-monorepo branch April 5, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants