microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
67.11k stars 3.69k forks source link

[Bug]: popup event doesnt work in new chromium headless #33703

Open TerenceTian625 opened 1 day ago

TerenceTian625 commented 1 day ago

Version

1.49

Steps to reproduce

I want to try the new chromium headless, but the popup event doesn't work. My test involves the Paypal payment which will have a payal popup window. It works fine in browser mode and chromium headless shell mode.

Expected behavior

const popupPromise = this.page.waitForEvent("popup"); should be able to get the popup event after the Paypal button is clicked.

Actual behavior

TimeoutError: page.waitForEvent: Timeout 60000ms exceeded while waiting for event "popup" =========================== logs =========================== waiting for event "popup"

Additional context

No response

Environment

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 1.18 GB / 32.00 GB
  Binaries:
    Node: 21.0.0 - ~/.nvm/versions/node/v21.0.0/bin/node
    npm: 10.2.0 - ~/.nvm/versions/node/v21.0.0/bin/npm
    bun: 1.0.6 - ~/.bun/bin/bun
  IDEs:
    VSCode: 0.41.3 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.49.0 => 1.49.0 
    playwright-msteams-reporter: ^0.0.10 => 0.0.10
dgozman commented 23 hours ago

@TerenceTian625 Unfortunately, we won't be able to help without a repro. If you cannot share a repro, I'd recommend debugging yourself in --headed mode - it should be very close to the new headless mode.