PageAssertions

Playwright\Assertions\PageAssertionsInterface

Methods

toHaveTitle()

self
function toHaveTitle(string|\Stringable $expected, ?AssertionOptions $options = null): self

toHaveURL()

self
function toHaveURL(string|\Stringable $expected, ?AssertionOptions $options = null): self

toMatchAriaSnapshot()

self

Asserts the ARIA snapshot of the page body equals the expectation. Compares the YAML as text, ignoring blank lines, trailing whitespace and the indentation shared by every line. The expectation describes the whole body subtree, not a subset of it.

function toMatchAriaSnapshot(string $expected, ?AssertionOptions $options = null): self

not()

self
function not(): self

withTimeout()

self
function withTimeout(int $timeoutMs): self

withPollInterval()

self
function withPollInterval(int $pollIntervalMs): self