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

[Question]: How to install browsers based on published artifacts? #2027

Closed timmkrause closed 2 years ago

timmkrause commented 2 years ago

Your question

I dotnet publish test project(s) and package them as pipeline artifacts which are (re)used to run tests in later stages within the pipeline.

How should playwright install be executed in this scenario?

timmkrause commented 2 years ago

playwright.ps1 is not part of dotnet publish.

mxschmitt commented 2 years ago

You can install the browser programatically, see here: https://playwright.dev/dotnet/docs/intro#install-browsers-via-api

Let us know if this works for you!

timmkrause commented 2 years ago

Works like a charm. Thank you @mxschmitt.