UNPKG

appium-remote-debugger

Version:
45 lines 2.56 kB
import type { RemoteDebugger } from '../remote-debugger'; /** * Executes a Selenium atom in Safari by generating the atom script and * executing it in the page context. * * @param atom - Name of the Selenium atom to execute (see atoms/ directory). * @param args - Arguments to pass to the atom function. Defaults to empty array. * @param frames - Frame context array for frame-specific execution. Defaults to empty array. * @returns A promise that resolves to the result received from the atom execution. */ export declare function executeAtom(this: RemoteDebugger, atom: string, args?: any[], frames?: string[]): Promise<any>; /** * Executes a Selenium atom asynchronously by creating a Promise in the page context * and waiting for the atom to resolve it. Falls back to polling if Runtime.awaitPromise * is not available. * * @param atom - Name of the Selenium atom to execute (see atoms/ directory). * @param args - Arguments to pass to the atom function. Defaults to empty array. * If args[2] is provided, it will be used as the timeout in milliseconds. * @param frames - Frame context array for frame-specific execution. Defaults to empty array. * @returns A promise that resolves to the result received from the atom execution. */ export declare function executeAtomAsync(this: RemoteDebugger, atom: string, args?: any[], frames?: string[]): Promise<any>; /** * Executes a JavaScript command in the page context and returns the result. * Optionally performs garbage collection before execution if configured. * * @param command - The JavaScript command string to execute. * @param override - Deprecated and unused parameter. * @returns A promise that resolves to the result of the JavaScript evaluation, * converted to a usable format. */ export declare function execute(this: RemoteDebugger, command: string, override?: boolean): Promise<any>; /** * Calls a JavaScript function on a remote object identified by objectId. * Optionally performs garbage collection before execution if configured. * * @param objectId - The object identifier of the remote object to call the function on. * @param fn - The function declaration string to execute on the object. * @param args - Optional array of arguments to pass to the function. * @returns A promise that resolves to the result of the function call, * converted to a usable format. */ export declare function callFunction(this: RemoteDebugger, objectId: string, fn: string, args?: any[]): Promise<any>; //# sourceMappingURL=execute.d.ts.map