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

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

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

Skip to main content

  • extends: [Error]

TimeoutError is emitted whenever certain operations are terminated due to timeout, e.g. Locator.WaitForAsync() or BrowserType.LaunchAsync() .

using Microsoft.Playwright;using var playwright = await Playwright.CreateAsync();await using var browser = await playwright.Chromium.LaunchAsync();var page = await browser.NewPageAsync();try{    await page.ClickAsync("text=Example", new() { Timeout = 100 });}catch (TimeoutException){    Console.WriteLine("Timeout!");}