flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
46 lines (45 loc) • 2.4 kB
TypeScript
/// <reference types="node" />
import { iValue } from "../interfaces/ivalue";
import { DOMElement } from "../html/dom-element";
import { ValuePromise } from "../value-promise";
import { JsonDoc } from "../json/jpath";
import { AppiumResponse } from "./appium-response";
import { PointerClick } from "../interfaces/pointer";
import { FindAllOptions, FindOptions } from "../interfaces/find-options";
import { iBounds } from "../interfaces/ibounds";
import { GestureOpts, GestureType } from "../interfaces/gesture";
import { ScreenshotOpts } from "../interfaces/screenshot";
import { iAssertionContext } from "../interfaces/iassertioncontext";
export declare class AppiumElement extends DOMElement implements iValue<any> {
protected _elementId: string;
protected _response: JsonDoc | undefined;
protected get session(): AppiumResponse;
static create(input: string, context: iAssertionContext, name: string, elementId: string): Promise<AppiumElement>;
protected constructor(input: string, context: iAssertionContext, name: string | null, elementId: string);
click(opts?: PointerClick): ValuePromise;
find(selector: string, a?: string | RegExp | FindOptions, b?: FindOptions): ValuePromise;
findAll(selector: string, a?: string | RegExp | FindAllOptions, b?: FindAllOptions): Promise<iValue<any>[]>;
protected: any;
type(input: string): ValuePromise;
clear(): ValuePromise;
clearThenType(input: string): ValuePromise;
isVisible(): Promise<boolean>;
getBounds(): Promise<iBounds | null>;
gesture(type: GestureType, opts: GestureOpts): ValuePromise;
tap(opts: PointerClick): ValuePromise;
longpress(opts: PointerClick): ValuePromise;
protected _getValue(): Promise<any>;
protected _getText(): Promise<string>;
protected _getTagName(): Promise<string>;
protected _getProperty(property: string): Promise<string>;
protected _getOuterHtml(): Promise<string>;
protected _getInnerHtml(): Promise<string>;
protected _getInnerText(): Promise<string>;
protected _getClassName(): Promise<string>;
protected _getAttribute(key: string): Promise<string | null>;
screenshot(): Promise<Buffer>;
screenshot(localFilePath: string): Promise<Buffer>;
screenshot(localFilePath: string, opts: ScreenshotOpts): Promise<Buffer>;
screenshot(opts: ScreenshotOpts): Promise<Buffer>;
toString(): string;
}