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
66.98k stars 3.68k forks source link

[Bug]: Playwright Test: Electron Apps - errors on Run Test mode #33209

Closed midleman closed 3 weeks ago

midleman commented 3 weeks ago

Version

1.48.1

Steps to reproduce

Requirements: must have Playwright Test vscode plugin installed.

  1. Clone my repo at: https://github.com/midleman/play-button-repro
  2. Run yarn
  3. Run test via command line: npx playwright test
  4. Verify test runs without error - PASS
  5. Click on Tests Explorer > Debug Test button
  6. Verify test runs without error - PASS
  7. Click on Tests Explorer > Run Test button
  8. Verify test runs without error - FAIL, electron is unable to launch

    Error: Process failed to launch!
    
    Error: electron.launch: Process failed to launch!

Expected behavior

For electron apps, I should be able to launch/run tests via any of the following options:

Actual behavior

I'm unable to run tests with Run Test play button for Electron apps specifically.

Additional context

No response

Environment

System: OS: macOS 14.6.1 CPU: (12) arm64 Apple M3 Pro Memory: 254.59 MB / 36.00 GB Binaries: Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node Yarn: 1.22.22 - /opt/homebrew/bin/yarn npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm IDEs: VSCode: 1.94.2 - /usr/local/bin/code Languages: Bash: 3.2.57 - /bin/bash npmPackages: @playwright/test: ^1.48.1 => 1.48.1

midleman commented 3 weeks ago

Well that was amazing... thank you for the prompt fix! ❤

mxschmitt commented 3 weeks ago

If you want to use the Beta with the fix, see here.

midleman commented 3 weeks ago

If you want to use the Beta with the fix, see here.

Confirmed the fix works. 🚀 Thanks again!