UNPKG

flagpole

Version:

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

31 lines (30 loc) 1.63 kB
/// <reference types="cheerio" /> import { Value } from './value'; import { DOMElement } from './domelement'; import { iValue, iAssertionContext, iScenario } from './interfaces'; export declare class HTMLElement extends DOMElement implements iValue { protected _path: string; protected _input: Cheerio; readonly $: 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<HTMLElement | Value>; findAll(selector: string): Promise<HTMLElement[]>; getClosest(selector?: string): Promise<HTMLElement | Value>; getChildren(selector?: string): Promise<HTMLElement[]>; getSiblings(selector?: string): Promise<HTMLElement[]>; getParent(): Promise<HTMLElement | Value>; getPreviousSibling(selector?: string): Promise<HTMLElement | Value>; getPreviousSiblings(selector?: string): Promise<HTMLElement[]>; getNextSibling(selector?: string): Promise<HTMLElement | Value>; getNextSiblings(selector?: string): Promise<HTMLElement[]>; click(): Promise<void>; click(callback: Function): Promise<void>; click(message: string, callback: Function): Promise<void>; fillForm(formData: any): Promise<void>; submit(): Promise<iScenario>; submit(callback: Function): Promise<iScenario>; submit(message: string, callback: Function): Promise<iScenario>; protected _getTagName(): Promise<string>; protected _getAttribute(key: string): Promise<string | null>; }