UNPKG

flagpole

Version:

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

36 lines (35 loc) 1.95 kB
/// <reference types="cheerio" /> import { DOMElement } from "./domelement"; import { iAssertionContext, iScenario, iValue, KeyValue } from "./interfaces"; export declare class HTMLElement extends DOMElement implements iValue { protected _path: string; protected _input: Cheerio | CheerioElement; get $(): Cheerio | CheerioElement; protected get el(): Cheerio; static create(input: any, context: iAssertionContext, name?: string | null, path?: string): Promise<HTMLElement>; protected constructor(input: any, context: iAssertionContext, name?: string | null, path?: string); find(selector: string): Promise<iValue>; findAll(selector: string): Promise<HTMLElement[]>; getClosest(selector?: string): Promise<HTMLElement | iValue>; getChildren(selector?: string): Promise<HTMLElement[]>; getSiblings(selector?: string): Promise<HTMLElement[]>; getParent(): Promise<HTMLElement | iValue>; getPreviousSibling(selector?: string): Promise<HTMLElement | iValue>; getPreviousSiblings(selector?: string): Promise<HTMLElement[]>; getNextSibling(selector?: string): Promise<HTMLElement | iValue>; getNextSiblings(selector?: string): Promise<HTMLElement[]>; click(): Promise<void>; click(message: string): Promise<iScenario>; click(callback: Function): Promise<iScenario>; click(scenario: iScenario): Promise<iScenario>; click(message: string, callback: Function): Promise<iScenario>; fillForm(attributeName: string, formData: KeyValue): Promise<iValue>; fillForm(formData: KeyValue): Promise<iValue>; submit(): Promise<void>; submit(message: string): Promise<iScenario>; submit(callback: Function): Promise<iScenario>; submit(scenario: iScenario): Promise<iScenario>; submit(message: string, callback: Function): Promise<iScenario>; protected _getTagName(): Promise<string>; protected _getAttribute(key: string): Promise<string | null>; }