Skip to main content
This function uses AI and incurs costs.
Uses AI vision to determine if a webpage has finished loading by analyzing a screenshot. Detects loading spinners, blank content, or incomplete page states.

Examples

Arguments

page
Page
required
The Playwright page to check
timeout_s
int
Screenshot timeout in seconds. Defaults to 10.
model
str
AI model to use for the check. Accepts any vision-capable model supported by Anthropic, OpenAI, or Google. Defaults to “claude-haiku-4-5-20251001”.
api_key
str
Optional API key for the AI service (if provided, will not be billed to your account). Defaults to None.

Returns: bool

True if page is loaded, False if still loading