Skip to main content
export declare function goToUrl(input: {
  page: Page;
  url: string;
  timeoutInMs?: number;
  retries?: number;
  throwOnTimeout?: boolean;
  waitForLoadState?: "load" | "domcontentloaded" | "networkidle";
  waitForLoadingStateUsingAi?: boolean;
  model?: SUPPORTED_MODELS;
  apiKey?: string;
}): Promise<void>;
Navigates to a specified URL with enhanced reliability features including automatic retries with exponential backoff, intelligent timeout detection, and optional AI-powered loading verification. This function handles common navigation challenges by automatically retrying failed requests, detecting navigation hangs, and ensuring the page reaches a truly idle state. For dynamic applications, it can optionally verify page loading completion using AI vision to detect loading spinners, blank content, or incomplete states. The function can be configured to either throw errors or gracefully continue execution when navigation issues occur.

Examples

import { goToUrl } from "@intuned/browser";
export default async function handler(params, page, context){
// Navigate with automatic retries on failure
await goToUrl({
  page,
  url: 'https://example.com'
});
// Automatically retries up to 3 times with exponential backoff
}

Arguments

input
Object
required
The input object containing the page and url

Returns: Promise<void>

Promise that resolves when navigation completes successfully. If the operation fails and throwOnTimeout is false, resolves without error