New method page.addLocatorHandler(locator, handler, handler, handler) 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.AddLocatorHandlerAsync(
Page.GetByRole(AriaRole.Heading, new() { Name = "Hej! You are in control of your cookies." }),
async () =>
{
await Page.GetByRole(AriaRole.Button, new() { Name = "Accept all" }).ClickAsync();
});
// Write the test as usual.
await Page.GotoAsync("https://www.ikea.com/");
await Page.GetByRole(AriaRole.Link, new() { Name = "Collection of blue and white" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Heading, new() { Name = "Light and easy" })).ToBeVisibleAsync();
This version was also tested against the following stable channels:
Google Chrome 122
Microsoft Edge 123
v1.41.2
Highlights
microsoft/playwright#29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded
microsoft/playwright#29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL
Browser Versions
Chromium 121.0.6167.57
Mozilla Firefox 121.0
WebKit 17.4
This version was also tested against the following stable channels:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps Microsoft.Playwright.NUnit from 1.40.0 to 1.42.0.
Release notes
Sourced from Microsoft.Playwright.NUnit's releases.
... (truncated)
Commits
913fbd3
devops: mark Docker images as EOL (#2879)678fcd2
chore(deps): bump SixLabors.ImageSharp from 2.1.3 to 2.1.7 in /src/Playwright...219e839
chore: mark v1.42.029e7452
chore(roll): roll Playwright to 1.42.1 (#2878)78bf322
chore(roll): roll Playwright to 1.42.0-alpha-2024-02-19 (#2869)0555b35
test: remove webgl test (tested upstream)ff94b68
test: sync PageEventPopupTests with upstream test suite (#2863)db3f283
devops: simplify Docker publishing (#2860)333d7e8
devops: simplify publishing pipeline (#2857)5e09dfa
devops: migrate to 1ES PT (#2855)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show