Skip to content

[Feature]: Add possibility to diagnose errors when Microsoft.Playwright.Program.Run() fails #3139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
0xced opened this issue Apr 3, 2025 · 0 comments · May be fixed by #3140
Open

[Feature]: Add possibility to diagnose errors when Microsoft.Playwright.Program.Run() fails #3139

0xced opened this issue Apr 3, 2025 · 0 comments · May be fixed by #3140

Comments

@0xced
Copy link
Contributor

0xced commented Apr 3, 2025

🚀 Feature Request

Ensuring that playwright is properly installed can be done by running the following code:

var playwright = new Microsoft.Playwright.Program();
var exitCode = playwright.Run(["install", "--with-deps"]);

This is fine when the installation succeeds and the exit code is 0. But when running under xUnit.net (which does not capture the console output) and the installation fails with exit code 1, then it becomes impossibly hard to diagnose the root cause of the failure.

It would be nice to have an exception instead of a non-zero exit code.

Example

No response

Motivation

Diagnosing such issues required me to reference Playwright from source rather than using the NuGet package, putting breakpoints to figure out the actual Node.js call and run it in a console to get the actual error messages.

It would be much better to have a built-in way to extract the root cause of the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants