# X_TEST_LOCATOR_EXPECTED

## Means

a matcher expected a locator and got something else

## Typical cause

`toBeVisible` handed a page, a selector string, or the result of awaiting the locator — anything with no `isVisible()`. Thrown rather than returned as a failing result, exactly as `X_TEST_SCHEMA_EXPECTED` is: the assertion is not false, it is unanswerable, and a `pass: false` would read as "the element was hidden"

## Fix

`expect(page.getByRole("heading", { name: "Feed" })).toBeVisible()` — the locator itself, unawaited

[Testing](/error-codes#testing)
