playwright: [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

About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 12
- Comments: 16
Unfortunately life-hack from @maximkoshelenko doesn’t help in my case. Any updates for this feature at the moment? I’ve found a workaround how to avoid login in the popup window (you can login as first step of your test using navigation to accounts.google.com and login there then when you click GPay button you will be already logged in) But I still can not press on Pay button in the popup even using keyboard.press methods. Page approach works fine for firefox and webkit.