Skip to content

Bump playwright from 1.35.1 to 1.42.0 in /browser

Bumps playwright from 1.35.1 to 1.42.0.

Release notes

Sourced from playwright's releases.

v1.42.0

New APIs

  • New method page.addLocatorHandler() registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears:
// Setup the handler.
await page.addLocatorHandler(
    page.getByRole('heading', { name: 'Hej! You are in control of your cookies.' }),
    async () => {
      await page.getByRole('button', { name: 'Accept all' }).click();
    });
// Write the test as usual.
await page.goto('https://www.ikea.com/');
await page.getByRole('link', { name: 'Collection of blue and white' }).click();
await expect(page.getByRole('heading', { name: 'Light and easy' })).toBeVisible();
electronApp.on('console', async msg => {
  const values = [];
  for (const arg of msg.args())
    values.push(await arg.jsonValue());
  console.log(...values);
});
await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
  • New syntax for adding tags to the tests (@-tokens in the test title are still supported):
test('test customer login', {
  tag: ['@fast', '@login'],
}, async ({ page }) => {
  // ...
});

Use --grep command line option to run only tests with certain tags.

npx playwright test --grep @fast
  • --project command line flag now supports '*' wildcard:
npx playwright test --project='*mobile*'
</tr></table> 

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by yurys, a new releaser for playwright since your current version.



Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • $dependabot rebase will rebase this MR
  • $dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts

Merge request reports