microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

Enable CLI integration for Playwright #1383

Closed kblok closed 3 years ago

avodovnik commented 3 years ago

The goal for this issue isn't necessarily to bring back the PlaywrightSharpTool, but to enable the CLI integration, specifically, we need to be able to run codegen from the command line.

One option to do this, would definitely be to use a dotnet tool, but that is generally fairly clunky. It would require:

1) We push a separate package, i.e. Microsoft.Playwright.CLI 2) Users would have to separately run dotnet tool install Microsoft.Playwright.CLI to get a command, i.e. pw-cli 3) They can then run pw-cli codegen

The problems/drawbacks here are:

Meanwhile, while definitely notsexy, the user can run the codegen facility now by doing:

 .\src\Playwright.Demos\bin\Debug\net5.0\.playwright\win-x64\native\playwright.cmd codegen https://www.wikipedia.org