UNPKG

appium-flutter-driver

Version:
66 lines 3.67 kB
/// <reference types="node" /> import { BaseDriver } from 'appium/driver'; import { desiredCapConstraints } from './desired-caps'; import XCUITestDriver from 'appium-xcuitest-driver'; import AndroidUiautomator2Driver from 'appium-uiautomator2-driver'; import type { DefaultCreateSessionResult, DriverCaps, RouteMatcher } from '@appium/types'; import type { IsolateSocket } from './sessions/isolate_socket'; import type { Server } from 'node:net'; type FluttertDriverConstraints = typeof desiredCapConstraints; declare class FlutterDriver extends BaseDriver<FluttertDriverConstraints> { socket: IsolateSocket | null; locatorStrategies: string[]; proxydriver: XCUITestDriver | AndroidUiautomator2Driver; device: any; portForwardLocalPort: string | null; localServer: Server | null; internalCaps: DriverCaps<FluttertDriverConstraints>; receiveAsyncResponse: (...args: any[]) => Promise<any>; proxyWebViewActive: boolean; executeElementCommand: (this: FlutterDriver, command: string, elementBase64?: string | undefined, extraArgs?: {}) => Promise<any>; executeGetVMCommand: (this: FlutterDriver) => Promise<{ isolates: [{ name: string; id: number; }]; }>; executeGetIsolateCommand: (this: FlutterDriver, isolateId: string | number) => Promise<unknown>; execute: (this: FlutterDriver, rawCommand: string, args: any[]) => Promise<any>; executeAsync: (this: FlutterDriver, rawCommand: string, args: any[]) => Promise<any>; getText: (this: FlutterDriver, el: string) => Promise<string | null>; setValue: (this: FlutterDriver, textInput: string | [string], el: string) => Promise<void>; clear: (this: FlutterDriver, el: string) => Promise<void>; getScreenshot: (this: FlutterDriver) => Promise<any>; click: (this: FlutterDriver, el: string) => Promise<any>; longTap: (this: FlutterDriver, gestures: Record<string, any>[], ms: number) => Promise<any>; tapEl: (this: FlutterDriver, el: string, longPress: boolean) => Promise<any>; tap: (this: FlutterDriver, gestures: Record<string, any>[], longPress: boolean) => Promise<void>; performTouch: (this: FlutterDriver, gestures: Record<string, any>[]) => Promise<any>; getContexts: (this: FlutterDriver) => Promise<string[]>; getCurrentContext: (this: FlutterDriver) => Promise<string>; setContext: (this: FlutterDriver, context: string) => Promise<void>; protected currentContext: string; private driverShouldDoProxyCmd; getClipboard: (this: FlutterDriver, contentType: string) => Promise<void>; setClipboard: (this: FlutterDriver, content: string, contentType: string) => Promise<void>; constructor(opts: any, shouldValidateCaps: boolean); createSession(...args: any[]): Promise<DefaultCreateSessionResult<FluttertDriverConstraints>>; deleteSession(): Promise<void>; installApp(appPath: string, opts?: {}): Promise<void>; activateApp(appId: string): Promise<void>; terminateApp(appId: string): Promise<any>; getOrientation(): Promise<string>; setOrientation(orientation: string): Promise<any>; validateLocatorStrategy(strategy: string): any; validateDesiredCaps(caps: DriverCaps<FluttertDriverConstraints>): caps is DriverCaps<FluttertDriverConstraints>; proxyCommand(url: string, method: string, body?: null): Promise<any>; executeCommand(cmd: string, ...args: [string, [{ skipAttachObservatoryUrl: string; any: any; }]]): Promise<any>; getProxyAvoidList(): RouteMatcher[]; proxyActive(): boolean; canProxy(): boolean; } export { FlutterDriver }; //# sourceMappingURL=driver.d.ts.map