import type { ElectronApplication } from 'playwright-core'; import type { PageFunctionOn } from 'playwright-core/types/structs'; import { RetryOptions } from './utilities'; /** * Wait for a function to evaluate to true in the main Electron process. This really * should be part of the Playwright API, but it's not. * * This function is to `electronApp.evaluate()` * as `page.waitForFunction()` is `page.evaluate()`. * * @param electronApp {ElectronApplication} - the Playwright ElectronApplication * @param fn {Function} - the function to evaluate in the main process - must return a boolean * @param arg {Any} optional - an argument to pass to the function * @returns {Promise} * @fulfil {void} Resolves when the function returns true */ export declare function electronWaitForFunction(electronApp: ElectronApplication, fn: PageFunctionOn, arg?: Arg, options?: Partial): Promise; /** * Electron's `evaluate` function can be flakey, * throwing an error saying the execution context has been destroyed. * This function retries the evaluation several times to see if it can * run the evaluation without an error. If it fails after the retries, * it throws the error. * * @param electronApp {ElectronApplication} - the Playwright ElectronApplication * @param fn {Function} - the function to evaluate in the main process * @param arg {Any} - an argument to pass to the function * @param retries - the number of times to retry the evaluation * @param retryIntervalMs - the interval between retries * @returns {Promise} - the result of the evaluation */ export declare function evaluateWithRetry(electronApp: ElectronApplication, fn: PageFunctionOn, arg?: Arg, options?: Partial): Promise; //# sourceMappingURL=general_helpers.d.ts.map