Im starting to use Playwright to automate my tests for a Blazor WebAssembly application, i created a new NUnit Test project and following the docs on playwright.dev i installed:
dotnet add package Microsoft.Playwright.NUnit
doing so i can inherit the PageTest class and directly use a Page object already configured for me without needing to instantiate the browser and the context
now i need to see what happens during my tests so i wanted to enable headed mode, normally i would launch the browser with this options like this:
await playwright.Firefox.LaunchAsync(new BrowserTypeLaunchOptions
{
Headless = false,
SlowMo = 50,
});
but i cant do that here, the official docs suggest to use this commands on the console
set HEADED=1
dotnet test
but nothing happens, the tests are run headless mode regardless.
Use this
It should work