import { Actor } from '@testla/screenplay'; import { Selector, SelectorOptions } from '../types'; import { FrameEnabledAction } from '../templates/FrameEnabledAction'; type WaitFOrUrlOptions = { timeout?: number; waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit'; }; /** * Action Class. Wait for either a specified loading state or for a selector to become visible/active. */ export declare class Wait extends FrameEnabledAction { private action; private constructor(); /** * wait for either a specified loading state or for a selector to become visible/active. * * @param {Actor} actor the actor object * @return {any} Returns when the required load state has been reached. */ performAs(actor: Actor): Promise; /** * Wait for a specific status of the page. * * @param {string} state either 'load', 'domcontentloaded' or 'networkidle' * @return {Wait} new Wait instance */ static forLoadState(state: 'load' | 'domcontentloaded' | 'networkidle'): Wait; /** * Wait for a specific selector to exist. * * @param {Selector} selector the selector. * @param {SelectorOptions} options (optional) advanced selector lookup options. * @return {Wait} new Wait instance */ static forSelector(selector: Selector, options?: SelectorOptions): Wait; /** * Wait for a specific event. * * @param {string} event the event. * @return {Wait} new Wait instance */ static forEvent(event: string): Wait; /** * Wait for a specific url. * * @param {string} url the url to wait for. * @return {Wait} new Wait instance */ static forUrl(url: string | RegExp, options?: WaitFOrUrlOptions): Wait; } export {};