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

Copy Markdown View Source

A failed matcher (Playwright.Expect).

Port of JS ExpectError (packages/playwright/src/matchers/matcherHint.ts). Its fields keep their JS names:

  • message - the matcher's message, as in JS (matcherResult.message).
  • name - "Error", as in JS.
  • matcherResult - the result as in JS: a map with name, message, pass, expected, actual, log, timeout, ariaSnapshot (keys whose JS value is undefined are left out), and suggestedRebaseline: for a test integration that writes inline aria snapshots, the new snapshot as a JS template literal ({indent} placeholders, JS escapes).
  • stack - "": Elixir has the stack trace of the raise.

Summary

Types

t()

See the module docs for the fields.

Types

t()

@type t() :: %Playwright.ExpectError{
  __exception__: term(),
  matcherResult: map() | nil,
  message: String.t(),
  name: String.t(),
  stack: String.t()
}

See the module docs for the fields.