UNPKG

flagpole

Version:

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

101 lines (100 loc) 4 kB
/// <reference types="node" /> import { iAssertionContext, iValue, iScenario, KeyValue, iBounds } from "./interfaces"; export declare class Value implements iValue { protected _input: any; protected _context: iAssertionContext; protected _name: string | null; protected _parent: any; protected _highlight: string; protected _sourceCode: string | null; protected _path: string | undefined; protected _tagName: string | undefined; get $(): any; get tagName(): string; get outerHTML(): string; get length(): iValue; get trim(): iValue; get path(): string; get name(): string; get highlight(): string; get parent(): any; get sourceCode(): string; get isFlagpoleValue(): true; constructor(input: any, context: iAssertionContext, name?: string, parent?: any, highlight?: string); toArray(): any[]; valueOf(): any; toString(): string; toFloat(): number; toInteger(): number; toType(): string; isNullOrUndefined(): boolean; isUndefined(): boolean; isNull(): boolean; isPromise(): boolean; isArray(): boolean; isString(): boolean; isObject(): boolean; isNumber(): boolean; isNumeric(): boolean; isNaN(): boolean; isCookie(): boolean; isRegularExpression(): boolean; isCheerioElement(): boolean; isPuppeteerElement(): boolean; hasProperty(key: string): Promise<iValue>; as(aliasName: string): iValue; getProperty(key: string): Promise<any>; click(): Promise<void>; click(scenario: iScenario): Promise<iScenario>; click(message: string): Promise<iScenario>; click(callback: Function): Promise<iScenario>; click(message: string, callback: Function): Promise<iScenario>; submit(): Promise<void>; submit(scenario: iScenario): Promise<iScenario>; submit(message: string): Promise<iScenario>; submit(callback: Function): Promise<iScenario>; load(): iScenario; load(message: string): iScenario; load(scenario: iScenario): iScenario; load(callback: Function): iScenario; fillForm(attributeName: string, formData: KeyValue): Promise<iValue>; fillForm(formData: KeyValue): Promise<iValue>; exists(): Promise<iValue>; exists(selector: string): Promise<iValue>; find(selector: string): Promise<iValue>; findAll(selector: string): Promise<iValue[]>; getClassName(): Promise<iValue>; hasClassName(className: string): Promise<iValue>; getTagName(): Promise<iValue>; getInnerText(): Promise<iValue>; getInnerHtml(): Promise<iValue>; getOuterHtml(): Promise<iValue>; hasAttribute(key: string): Promise<iValue>; getAttribute(key: string): Promise<iValue>; hasData(key: string): Promise<iValue>; getData(key: string): Promise<iValue>; getStyleProperty(key: string): Promise<iValue>; download(): Promise<any>; getValue(): Promise<iValue>; getText(): Promise<iValue>; screenshot(): Promise<Buffer>; focus(): Promise<void>; hover(): Promise<void>; tap(): Promise<void>; press(key: string, opts?: any): Promise<void>; clearThenType(textToType: string, opts?: any): Promise<void>; type(textToType: string, opts?: any): Promise<void>; clear(): Promise<void>; getClosest(selector?: string): Promise<iValue>; getChildren(selector?: string): Promise<iValue[]>; getParent(): Promise<iValue>; getSiblings(selector?: string): Promise<iValue[]>; getPreviousSibling(selector?: string): Promise<iValue>; getPreviousSiblings(selector?: string): Promise<iValue[]>; getNextSibling(selector?: string): Promise<iValue>; getNextSiblings(selector?: string): Promise<iValue[]>; getBounds(boxType: string): Promise<iBounds | null>; protected _completedAction(verb: string, noun?: string): Promise<void>; protected _failedAction(verb: string, noun?: string): Promise<void>; protected _wrapAsValue(data: any, name: string, parent?: any, highlight?: string): iValue; }