microsoft / microsoft/playwright-dotnet

[Feature] More intuitive setup and installation of Playwright

Open
#2,286 46 comments 73 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
Dominant language
C#
Stars
3k
Forks
304
Avg merge
20h 47m
Merged PRs (30d)
6

Description

I'm a fan of PowerShell, but I think having to add Microsoft.Playwright.NUnit or a similar package, then build your project, then execute a PowerShell script that you can find in the bin/something...something/playwright.ps1 is not the ideal experience or the experience .NET developers expect. It works great tho!

I was hoping the Playwright setup experience could be more in line with what we expect as .NET developers.
I'm not an expert on MSBuild and still new to Playwright, so call me out if I'm off base!

When installing any Playwright NuGet package, I'd expect the installation to modify the MSBuild project file, and the MSBuild project file would setup all of Playwright the first time.
I'm not sure if Playwright updates its dependencies automatically over time, but if it did, I'd expect that to be checked for and updated during build. This could also be a standalone MSBuild target.

Alternatively, I think Playwright may also be a good fit for a global tool, or a local tool like the ef core tool.
Then inside the project, you may be able to run dotnet playwright init or dotnet playwright update.

Based on the NuGet package and MSBuild target described above, I'd expect there to be additional .NET templates for NUnit, MsTest, and xUnit. These templates would be the most intuitive ways to get started with Playwright and also to be reused for .NET IDEs like Visual Studio, VS Code, and Rider.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the NuGet package setup, the MSBuild project file, and the generated bin/.../playwright.ps1 script mentioned in the issue. Compare the proposed MSBuild target, dotnet playwright init/update commands, and NUnit, MsTest, and xUnit templates; the scope is complete when an agreed installation approach and template requirements are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
build-system, testing-qa, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.