I have created some tests using Playwright with .NET bindings.
[OneTimeSetUp]
public async Task OneTimeSetUp()
{
random = new Random();
var playwright = await Playwright.CreateAsync();
browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
{
Headless = false
});
context = await browser.NewContextAsync();
page = await context.NewPageAsync();
}
Before running tests I had run
npx playwright install
before running tests. The outcome of aforementioned command are browsers installed in path C:\Users\username\AppData\Local\ms-playwright
When running tests however, error is thrown:
OneTimeSetUp: Microsoft.Playwright.PlaywrightException : Executable doesn't exist at C:\Users\11033414\AppData\Local\ms-playwright\chromium-907428\chrome-win\chrome.exe
so it seems like playwright wants to use other versions of browsers than installed ones. How to make Playwright point to correct versions of browsers installed?
(The current error description is a bug in 1.14, it gets fixed with 1.15.)