Skip to content

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

Open
@0xced

Description

@0xced

🚀 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions