Playwright.PlaywrightError exception (Playwright v1.65.0-rc.3)

Copy Markdown View Source

A Playwright error other than a timeout, closed target or abort.

Port of JS Error thrown by Playwright (packages/playwright-core/src/client/errors.ts). Playwright.TimeoutError, Playwright.TargetClosedError and Playwright.AbortError have the same fields. They keep their JS names:

  • message - JS's message: the API name, the error, then the call log ("locator.click: Timeout 100ms exceeded. Call log: ...").
  • name - the JS error name: "Error" unless the driver sends another.
  • log - the call log, a list of lines.
  • details - the error details the protocol declares for the call (a map), else nil.
  • stack - the driver's JS stack trace ("" for errors of the client).
  • code - a system error code ("ECONNREFUSED"), else nil.
  • cause - the error behind this one, else nil: the File.Error of a storage-state file that can't be read, the reason given to Playwright.AbortController.abort/2.

Summary

Types

t()

See the module docs for the fields.

Types

t()

@type t() :: %Playwright.PlaywrightError{
  __exception__: term(),
  cause: term(),
  code: String.t() | nil,
  details: map() | nil,
  log: [String.t()],
  message: String.t(),
  name: String.t(),
  stack: String.t()
}

See the module docs for the fields.