import { Page } from '@playwright/test';
export interface SafeWaitForURLOptions {
    timeout?: number;
    waitUntil?: 'commit' | 'domcontentloaded' | 'load' | 'networkidle';
    maxRetries?: number;
}
/**
 * Check if the current browser is Firefox
 */
export declare function isFirefox(page: Page): boolean;
/**
 * Safe wrapper around page.waitForURL that handles browser-specific navigation errors
 *
 * Firefox has stricter navigation lifecycle handling that can cause NS_BINDING_ABORTED
 * errors when multiple rapid navigations occur (React router redirects, auth redirects).
 *
 * Safari can throw "Navigation canceled by policy check" errors during cross-origin
 * navigations or when security policies interrupt the navigation flow.
 *
 * This utility:
 * 1. Uses `waitUntil: 'commit'` for Firefox (faster, avoids abort)
 * 2. Includes retry logic for NS_BINDING_ABORTED errors (Firefox)
 * 3. Handles "Navigation canceled by policy check" errors (Safari)
 * 4. Checks if URL is already correct before failing
 */
export declare function safeWaitForURL(page: Page, urlPattern: string | RegExp | ((url: URL) => boolean), options?: SafeWaitForURLOptions): Promise<void>;
