import { timing } from '@appium/support';
import type { RemoteDebugger } from '../remote-debugger';
export declare const DEFAULT_PAGE_READINESS_TIMEOUT_MS: number;
/**
 * Emits a frame detached event when a frame is detached from the page.
 * This is typically called by the RPC client when receiving a Page.frameDetached event.
 */
export declare function frameDetached(this: RemoteDebugger): void;
/**
 * Cancels the current page load operation by unregistering from page readiness
 * notifications and canceling any pending page load delay.
 */
export declare function cancelPageLoad(this: RemoteDebugger): void;
/**
 * Determines if the current readyState indicates that page loading is completed
 * based on the configured page load strategy.
 *
 * @param readyState - The document readyState value ('loading', 'interactive', or 'complete').
 * @returns True if the page load is considered complete for the current strategy:
 *          - 'eager': returns true when readyState is not 'loading'
 *          - 'none': always returns true
 *          - 'normal' (default): returns true only when readyState is 'complete'
 */
export declare function isPageLoadingCompleted(this: RemoteDebugger, readyState: string): boolean;
/**
 * Waits for the DOM to be ready by periodically checking the page readiness state.
 * Uses exponential backoff for retry intervals and respects the configured page load
 * strategy and timeout settings.
 *
 * @param startPageLoadTimer - Optional timer instance to use for tracking elapsed time.
 *                             If not provided, a new timer will be created and started.
 */
export declare function waitForDom(this: RemoteDebugger, startPageLoadTimer?: timing.Timer): Promise<void>;
/**
 * Checks if the current page is ready by executing a JavaScript command to
 * retrieve the document readyState and evaluating it against the page load strategy.
 *
 * @param timeoutMs - Optional timeout in milliseconds for the readyState check.
 *                    If not provided, uses the configured page ready timeout.
 * @returns A promise that resolves to true if the page is ready according to
 *          the page load strategy, false otherwise or if the check times out.
 */
export declare function checkPageIsReady(this: RemoteDebugger, timeoutMs?: number): Promise<boolean>;
/**
 * Navigates to a new URL and waits for the page to be ready.
 * Validates the URL format, waits for the page to be available, sets window.location.href
 * via Runtime.evaluate (Page.navigate was removed from WebKit Inspector protocol), and
 * monitors for the Page.loadEventFired event or timeout.
 *
 * @param url - The URL to navigate to. Must be a valid URL format.
 * @throws TypeError if the provided URL is not a valid URL format.
 */
export declare function navToUrl(this: RemoteDebugger, url: string): Promise<void>;
//# sourceMappingURL=navigate.d.ts.map