Sometimes a UI element loads later than expected — due to a network response, animation, or server delay. In such cases Playwright’s default timeout may not be enough.
In Playwright you can set a custom timeout by passing a numeric value via expect(locator, { timeout: ms }). This makes the assertion wait up to the specified number of milliseconds.
page is already available. In the browser on the right there is a #status element. Assert its content with { timeout: 8000 } (or any other ms value).
Passing the timeout value inside the
expectcall is sufficient — it applies only to that single assertion.