Skip to content
masterclass Buddy

Playwright · Matcher

toBeOK

Checks that an API response has a successful HTTP status. A successful status is any code from 200 through 299.

Last updated

Since
v1.18

Syntax

await expect(response).toBeOK()

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

Subscribe
  • APIResponseAssertions
  • APIResponse
  • expect
  • not

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