Multiple of my playwright tests are failing on Firefox.
I realized that a popup from Firefox Nightly, proposing to translate the current page from French to English, is preventing my test from clicking the element behind it.
I tried to click on the cancel button of the popup but could not detect the button on the page with the following code:
await page.getByText('Cancel').click()
and doing:
await page.keyboard.press('Escape')
do not get rid of the popup even though I does get rid of it when I do it manually with my keyboard.
Using locale, timezone and geo location matching the page language did not get rid of the popup.
Listening for the popup event either as per the "Handling popups" page from the playwright documentation.
When I try to use await page.pause()
the second I press "record" the popup disappears and I can't auto generate the code to close it.
I made this repository with steps to reproduce in the README and it has a video to show the problem.
This is tricky because the "popup" is not from the page but the browser itself. I have no idea how to interact with it with Playwright. (I looked into the doc though)
help
This is fixed in the current canary version.
Here is how I installed it:
yarn add -D playwright@1.40.0-alpha-nov-3-2023 &&
yarn add -D @playwright/test@next