flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
55 lines (54 loc) • 3 kB
TypeScript
import { Value } from "../value";
import { iValue } from "../interfaces/ivalue";
import { iAssertionContext } from "../interfaces/iassertioncontext";
import { iScenario } from "../interfaces/iscenario";
import { ValuePromise } from "../value-promise";
import { FindAllOptions, FindOptions } from "../interfaces/find-options";
import { ClassConstructor } from "../interfaces/generic-types";
import { iMessageAndCallback } from "../interfaces/imessage-and-callback";
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): ValuePromise;
abstract find(selector: string, contains: string, opts?: FindOptions): ValuePromise;
abstract find(selector: string, matches: RegExp, opts?: FindOptions): ValuePromise;
abstract findAll(selector: string, opts?: FindAllOptions): Promise<iValue<any>[]>;
abstract findAll(selector: string, contains: string, opts?: FindAllOptions): Promise<iValue<any>[]>;
abstract findAll(selector: string, matches: RegExp, opts?: FindAllOptions): Promise<iValue<any>[]>;
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(): ValuePromise;
getInnerText(): ValuePromise;
getInnerHtml(): ValuePromise;
getOuterHtml(): ValuePromise;
getAttribute(key: string): ValuePromise;
getStyleProperty(key: string): ValuePromise;
getProperty(key: string): ValuePromise;
getValue(): ValuePromise;
getText(): ValuePromise;
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<ClassConstructor<iScenario>>;
protected _createSubScenario(overloaded: iMessageAndCallback): Promise<iScenario>;
protected _loadSubScenario(overloaded: iMessageAndCallback): Promise<iScenario>;
}