flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
51 lines (50 loc) • 2.85 kB
TypeScript
import { Value } from "../value";
import { iValue, iAssertionContext, iScenario, iMessageAndCallback, FindOptions, FindAllOptions } from "../interfaces";
import { ResponseType } from "../enums";
export declare abstract class DOMElement extends Value {
get name(): string;
protected constructor(input: any, context: iAssertionContext, name?: string | null, path?: string);
abstract find(selector: string, opts?: FindOptions): Promise<iValue>;
abstract find(selector: string, contains: string, opts?: FindOptions): Promise<iValue>;
abstract find(selector: string, matches: RegExp, opts?: FindOptions): Promise<iValue>;
abstract findAll(selector: string, opts?: FindAllOptions): Promise<iValue[]>;
abstract findAll(selector: string, contains: string, opts?: FindAllOptions): Promise<iValue[]>;
abstract findAll(selector: string, matches: RegExp, opts?: FindAllOptions): Promise<iValue[]>;
protected abstract _getTagName(): Promise<string>;
protected abstract _getAttribute(key: string): Promise<string | null>;
protected abstract _getClassName(): Promise<string>;
protected abstract _getInnerText(): Promise<string>;
protected abstract _getInnerHtml(): Promise<string>;
protected abstract _getOuterHtml(): Promise<string>;
protected abstract _getProperty(key: string): Promise<any>;
protected abstract _getValue(): Promise<any>;
protected abstract _getText(): Promise<string>;
toString(): string;
getClassName(): Promise<iValue>;
getInnerText(): Promise<iValue>;
getInnerHtml(): Promise<iValue>;
getOuterHtml(): Promise<iValue>;
getAttribute(key: string): Promise<iValue>;
getStyleProperty(key: string): Promise<iValue>;
getProperty(key: string): Promise<iValue>;
getValue(): Promise<iValue>;
getText(): Promise<iValue>;
load(): Promise<void>;
load(message: string): Promise<iScenario>;
load(callback: Function): Promise<iScenario>;
load(scenario: iScenario): Promise<iScenario>;
load(message: string, callback: Function): Promise<iScenario>;
protected _isFormTag(): Promise<boolean>;
protected _isButtonTag(): Promise<boolean>;
protected _isLinkTag(): Promise<boolean>;
protected _isImageTag(): Promise<boolean>;
protected _isVideoTag(): Promise<boolean>;
protected _isAudioTag(): Promise<boolean>;
protected _isScriptTag(): Promise<boolean>;
protected _isStylesheetTag(): Promise<boolean>;
protected _isClickable(): Promise<boolean>;
protected _getLambdaScenarioType(): Promise<ResponseType>;
protected _getLambdaScenarioOpts(newScenarioType: ResponseType): any;
protected _createSubScenario(overloaded: iMessageAndCallback, defaultResponseType?: ResponseType, defaultOpts?: any): iScenario;
protected _loadSubScenario(overloaded: iMessageAndCallback): Promise<iScenario>;
}