[BUG] Cannot handle the GooglePay Popup window
Context:
- Playwright Version: 1.28
- Operating System: Windows
- Browser: All, Chromium
Code Snippet Example 1 - waiting for new page:
const pagePromise = context.waitForEvent('page');
await page.locator('.gpay-button').click();
const newPage = await pagePromise;
await newPage.waitForLoadState();
console.log(await newPage.title());
Result: Timeout waiting for page;
Example 2 - waiting for new popup:
const popupPromise = page.waitForEvent('popup');
await page.locator('.gpay-button').click();
const popup = await popupPromise;
// Wait for the popup to load.
await popup.waitForLoadState();
console.log(await popup.title());
Result: Timeout waiting for popup;
Describe the bug Playwright cannot handle this popup/page in any way. I was trying to record the scenario in visual studio code but nothing happens after this popup is opened - recording actions stops in it.
Popup to handle

@krystian-jedrzejowski-zazoon Google Pay popup is not a regular page, so the popup is not exposed through Playwright API. I'll mark this as P3 to collect further feedback.
I am having same issue. Actually only with Chromium. I tried with Firefox and It worked.
Being honest, I tried with waitForEvent("page") with Firefox and It worked 100% of times, but with chromium It worked I would say only 5% of times.
Even with page.on("page") when you click on the Button that launches the new Page the event is not caught when the browser is Chromium, but always when It is Firefox
@aslushnikov Any updates on this
@krystian-jedrzejowski-zazoon No updates, and this is very low on our list since this doesn't have too much interest from the community.
@aslushnikov would love to re-open this thread as this is a feature that we'd find really valuable in Playwright. Can you provide any guidance on what a fix here might entail? Perhaps I could try to implement it as a first pass.
@averym-stripe the main complexity is in contributing missing instrumentation to all 3 browser debugging protocols: CDP in Chromium, WebInspector protocol in WebKit, and Juggler in Firefox.
Same problem here, is there any new workaround?
Same problem here, any updates?
We are having same issue and have been avoiding testing our google pay flow there because of that. Is there any update on this?
This has been a problem for us for quite a while now, any intentions on fixing it?
What we did as a workaround is to use Firefox agent instead of Chrome for handling test cases where we need to deal with Google Pay Popup (in Firefox seems to be just a regular page), and so far it is working fine for us.
Yeah, we can actually configure it that way for the sake of having our e2e working but it would still be preferable to have the tests working on chrome as that is our requirement at this time, that's why I was asking for a follow up if there is any priority on a potential fix in that area.