UNPKG

flagpole

Version:

Simple and fast DOM integration, headless or headful browser, and REST API testing framework.

41 lines (40 loc) 1.68 kB
import { ProtoValue } from './value'; import { Scenario } from './scenario'; import { AssertionContext } from './assertioncontext'; export declare class NodeElement extends ProtoValue { protected _path: string; constructor(input: any, context: AssertionContext, path?: string); getClassName(): Promise<string | null>; hasClassName(className: string): Promise<boolean>; getTagName(): Promise<string | null>; hasAttribute(key: string): Promise<boolean>; getAttribute(key: string): Promise<any>; getProperty(key: string): Promise<any>; hasData(key: string): Promise<boolean>; getData(key: string): Promise<any>; getValue(): Promise<any>; getText(): Promise<string | null>; fillForm(formData: any): Promise<any>; getChildren(selector?: string): Promise<NodeElement[]>; getNext(selector?: string): Promise<NodeElement | null>; getPrevious(selector?: string): Promise<NodeElement | null>; getSiblings(selector?: string): Promise<NodeElement | null>; getClosest(selector?: string): Promise<NodeElement | null>; getParent(selector?: string): Promise<NodeElement | null>; submit(a?: string | Function, b?: Function): Promise<any>; click(a?: string | Function, b?: Function): Promise<any>; load(a?: string | Function, b?: Function): Promise<Scenario>; private _isFormTag; private _isButtonTag; private _isLinkTag; private _isImageTag; private _isVideoTag; private _isAudioTag; private _isScriptTag; private _isStylesheetTag; private _isClickable; private _getUrl; private _getLambdaScenarioType; private _getLink; private _createLambdaScenario; }