Playwright: [BUG] How to dismiss dialogs on Firefox?

Created on 27 Nov 2020  ·  3Comments  ·  Source: microsoft/playwright

The code below works well on Chromium and Webkit, but on Firefox.

page.on('dialog', dialog => {
  dialog.dismiss().catch(() => {})
})

Is there another way to dismiss dialogs on Firefox?

Update:

An example repo which reproduces this error: https://github.com/saltyshiomix/playwright-issue-4546

It seems that Firefox can't handle the second dialog which includes the additional text Prevent this page from creating additional dialogs.

スクリーンショット 2020-12-01 6 43 37

It works perfectly both of Chromium and Webkit 👍

Environment

  • Playwright version: 0.162.0
  • OS version: macOS Big Sur 11.0.1(20B29)
P2-bug

Most helpful comment

Thank you for your kind words! I can repro this, we'll fix it soon.

All 3 comments

Could you please provide a page url, or a snippet that reproduces the issue?
Also, could you please provide Playwright version and OS version?

Thank you for your reply, @dgozman !

I edited the description of this issue.

By the way, I proudly believe the playwright saves the E2E world so I'm ready to contribute to around the playwright at anytime :)

Thank you for your kind words! I can repro this, we'll fix it soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

etnbrd picture etnbrd  ·  4Comments

Sue9445 picture Sue9445  ·  4Comments

jperl picture jperl  ·  3Comments

myobie picture myobie  ·  3Comments

andyricchuiti picture andyricchuiti  ·  4Comments