ui-omakase-framework
Version:
A comprehensive E2E testing framework library with pre-built Cucumber step definitions and utilities for web automation testing
22 lines (21 loc) • 1.06 kB
TypeScript
import { Frame, Page } from "playwright";
import { ElementLocator, GlobalConfig, WaitForTarget, WaitForTargetType } from "../env/global";
export declare const enum waitForResult {
PASS = 1,
FAIL = 2,
ELEMENT_NOT_AVAILABLE = 3
}
export type waitForResultWithContext = {
result: waitForResult;
replace?: string;
};
export declare const waitFor: <T>(predicate: () => waitForResult | Promise<waitForResult> | waitForResultWithContext | Promise<waitForResultWithContext>, globalConfig: GlobalConfig, options?: {
timeout?: number;
wait?: number;
target?: WaitForTarget;
type?: WaitForTargetType;
failureMessage?: string;
}) => Promise<void>;
export declare const waitForSelector: (page: Page, elementIdentifier: ElementLocator) => Promise<boolean>;
export declare const waitForSelectorOnPage: (page: Page, elementIdentifier: ElementLocator, pages: Array<Page>, pageIndex: number) => Promise<boolean>;
export declare const waitForSelectorInIframe: (elementIframe: Frame, elementIdentifier: ElementLocator) => Promise<boolean>;