This commit is contained in:
Yury Semikhatsky 2024-02-27 10:25:37 -08:00
parent 64da70b480
commit 7e0765c279

View file

@ -14,10 +14,10 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
```js
// 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();
});
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();