📄 playwright-python/dotnet/docs/api/class-weberror

File: class-weberror.md | Updated: 11/18/2025

Source: https://playwright.dev/dotnet/docs/api/class-weberror

Skip to main content

On this page

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

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

Methods


Error

Added in: v1.38 webError.Error

Unhandled error that was thrown.

Usage

WebError.Error

Returns


Page

Added in: v1.38 webError.Page

The page that produced this unhandled exception, if any.

Usage

WebError.Page

Returns