Skip to content
masterclass Buddy

Playwright · Function

expect.toPass

expect.toPass retries an asynchronous code block until its assertions pass. Configure the retry timeout and probe intervals when needed.

Last updated

Syntax

await expect(async () => { /* code and assertions */ }).toPass(options?)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • expect
  • expect.poll
  • expect.configure
  • expect.extend

Source: Assertions | Playwright. Checked 2026-11-03.