UNPKG

multi-automator

Version:
38 lines (37 loc) 811 B
/// <reference types="node" /> import AndroidHandler from './Handler'; import { ElementBounds } from '../types'; interface ElementOptions { device: AndroidHandler; bounds: ElementBounds; attributes: any; } export default class Element { device: AndroidHandler; bounds: ElementBounds; attributes: any; constructor(options: ElementOptions); /** * 获取元素边界 */ boundingBox(): Promise<ElementBounds>; /** * 获取元素属性 */ attribute(name: string): Promise<string>; /** * 点击元素 */ tap(): Promise<void>; /** * 输入文本 */ input(text: string, options?: { wait?: number; }): Promise<void>; /** * 截图 */ screenshot(path?: string): Promise<Buffer>; } export {};