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

User prompt dialog events are emitted twice #3143

Open
OrKoN opened this issue Feb 24, 2025 · 1 comment
Open

User prompt dialog events are emitted twice #3143

OrKoN opened this issue Feb 24, 2025 · 1 comment
Labels
bug Something isn't working P1

Comments

@OrKoN
Copy link
Collaborator

OrKoN commented Feb 24, 2025

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  protocol: 'webDriverBiDi',
  headless: false,
});

const page = await browser.newPage();

page.on('dialog', async dialog => {
  console.log(dialog.type);
  await dialog.dismiss().catch((err) => console.error('dismiss failed', err))
});

await page.goto('https://htho.github.io/wdio-repro-collection/iframeNavigation.html');

await page.evaluate(() => {
  alert('test');
});

await browser.close();

Expected:

On dialog handler is invoked once.

Actual:

On dialog handler is invoked twice, the second dialog dismiss call fails since it was already handled.

@OrKoN OrKoN added bug Something isn't working P1 labels Feb 24, 2025
@OrKoN
Copy link
Collaborator Author

OrKoN commented Feb 24, 2025

@sadym-chromium could you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

1 participant