UNPKG

flagpole

Version:

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

44 lines (43 loc) 2.23 kB
import { Value } from './value'; import { iValue, iAssertionContext, iScenario } from "./interfaces"; import { ElementHandle } from 'puppeteer'; import { DOMElement } from './domelement'; export declare class PuppeteerElement extends DOMElement implements iValue { protected _input: ElementHandle; readonly $: ElementHandle; static create(input: any, context: iAssertionContext, name?: string | null, path?: string): Promise<PuppeteerElement>; protected constructor(input: any, context: iAssertionContext, name?: string | null, path?: string); toString(): string; getClassName(): Promise<Value>; hasClassName(className: string): Promise<Value>; find(selector: string): Promise<PuppeteerElement | Value>; findAll(selector: string): Promise<PuppeteerElement[]>; getClosest(selector?: string): Promise<PuppeteerElement | Value>; getChildren(selector?: string): Promise<PuppeteerElement[]>; getParent(): Promise<PuppeteerElement | Value>; getSiblings(selector?: string): Promise<PuppeteerElement[]>; getPreviousSibling(selector?: string): Promise<PuppeteerElement | Value>; getPreviousSiblings(selector?: string): Promise<PuppeteerElement[]>; getNextSibling(selector?: string): Promise<PuppeteerElement | Value>; getNextSiblings(selector?: string): Promise<PuppeteerElement[]>; getInnerText(): Promise<Value>; getInnerHtml(): Promise<Value>; getOuterHtml(): Promise<Value>; getProperty(key: string): Promise<Value>; getData(key: string): Promise<Value>; getValue(): Promise<Value>; getText(): Promise<Value>; clearThenType(textToType: string, opts?: any): Promise<void>; type(textToType: string, opts?: any): Promise<void>; clear(): Promise<void>; fillForm(formData: any): Promise<any>; submit(): Promise<void>; submit(callback: Function): Promise<void>; submit(message: string, callback: Function): Promise<void>; click(): Promise<void>; click(callback: Function): Promise<iScenario>; click(message: string, callback: Function): Promise<iScenario>; protected _getTagName(): Promise<string>; protected _getSourceCode(): Promise<void>; protected _getAttribute(key: string): Promise<any>; }