Table of Contents

Interface IWebError

Namespace
Microsoft.Playwright
Assembly
Microsoft.Playwright.dll

IWebError class represents an unhandled exception thrown in the page. It is dispatched via the WebError event.

// Log all uncaught errors to the terminal
context.WebError += (_, webError) =>
{
  Console.WriteLine("Uncaught exception: " + webError.Error);
};
public interface IWebError

Properties

Error

Unhandled error that was thrown.

string Error { get; }

Property Value

string

Page

The page that produced this unhandled exception, if any.

IPage? Page { get; }

Property Value

IPage