English · .NET
Appearance
English · .NET
Appearance
Extends: RuntimeException
PlaywrightException is thrown whenever certain operations are terminated abnormally, e.g. browser closes while Page.EvaluateAsync() is running.
try
{
await page.EvaluateAsync("() => new Promise(() => {})");
}
catch (PlaywrightException e)
{
// When the page closes during the call, the exception message says so.
Console.WriteLine(e.Message);
}