flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
22 lines (21 loc) • 1.37 kB
TypeScript
import { iValue, iAssertionContext } from "../interfaces";
import { JSHandle, ElementHandle, EvaluateFn, Page, PageFnOptions, SerializableOrJSHandle } from "puppeteer-core";
import { DOMElement } from "../html/domelement";
export declare abstract class PuppeteerElement extends DOMElement implements iValue {
protected abstract _input: ElementHandle | JSHandle;
abstract get $(): ElementHandle | JSHandle;
protected get _page(): Page;
protected constructor(input: JSHandle | ElementHandle, context: iAssertionContext, name: string, path?: string);
toString(): string;
clearThenType(textToType: string, opts?: any): Promise<void>;
eval(js: string): Promise<any>;
waitForFunction(js: EvaluateFn<any>, timeout: number, ...args: SerializableOrJSHandle[]): Promise<iValue>;
waitForFunction(js: EvaluateFn<any>, opts?: PageFnOptions, ...args: SerializableOrJSHandle[]): Promise<iValue>;
waitForHidden(timeout?: number): Promise<iValue>;
waitForVisible(timeout?: number): Promise<iValue>;
protected _getSourceCode(): Promise<string>;
protected _eval(js: EvaluateFn<any>, arg?: any): Promise<any>;
protected _getProperty(key: string): Promise<unknown>;
protected _waitForIt(fn: EvaluateFn, verb: string, timeout?: number): Promise<this>;
protected _waitForFunction(fn: EvaluateFn, timeout?: number): Promise<this>;
}