Page
tcmts.cli.test.browser.Page · #4eepgenl · type
export interface Page {
/** evaluate an expression in the page (awaiting a promise), returning its JSON value */
evaluate<T = unknown>(expression: string): Promise<T>;
/** poll `expression` until `until` accepts its value; returns the last value seen */
waitFor<T = unknown>(
expression: string,
until: (v: T) => boolean,
timeoutMs?: number,
): Promise<T>;
/** the page's console errors and uncaught exceptions so far */
errors: string[];
/** everything the page's console has said so far, each call's arguments joined */
logs: string[];
}
used by