Playwright · Matcher
toBeInViewport
Playwright assertions use expect and matchers to check values or web-page state. Web-specific locator assertions retry until they pass or the assertion timeout is reached.
Last updated
Syntax
await expect(locator).toHaveText(expected, options);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expecttoHaveTexttoBeVisibletoBeAttachedtoBeCheckedtoHaveURLtoHaveTitleexpect.poll