Skip to main content
export declare function isPageLoaded(input: {
  page: Page;
  timeoutInMs?: number;
  model?: SUPPORTED_MODELS;
  apiKey?: string;
}): Promise<boolean>;
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

import { isPageLoaded } from "@intuned/browser/ai";
export default async function handler(params, page, context){
// Wait for page to finish loading
await page.goto('https://example.com');

const pageLoaded = await isPageLoaded({page});
if (pageLoaded) {
  // Continue with scraping or interactions
} else {
  // Wait longer or retry
}
}

Arguments

input
Object
required
Input object containing the page to check

Returns: Promise<boolean>

Promise resolving to true if page is loaded, false if still loading