# `Playwright.ExpectError`
[🔗](https://github.com/ftes/playwright_ex/blob/v1.65.0-rc.3/lib/playwright/expect_error.ex#L5)

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.

# `t`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
