appium-espresso-driver
Version:
Espresso integration for Appium
980 lines • 39.2 kB
TypeScript
import type { DriverData, ExternalDriver, InitialOpts, StringRecord, SingularSessionData, RouteMatcher } from '@appium/types';
import type { EspressoConstraints } from './constraints';
import { EspressoRunner } from './espresso-runner';
import * as appManagementCmds from './commands/app-management';
import * as contextCmds from './commands/context';
import * as elementCmds from './commands/element';
import * as miscCmds from './commands/misc';
import * as servicesCmds from './commands/services';
import * as screenshotCmds from './commands/screenshot';
import * as idlingResourcesCmds from './commands/idling-resources';
import * as actionsCmds from './commands/actions';
import * as clipboardCmds from './commands/clipboard';
import { AndroidDriver } from 'appium-android-driver';
import type { EspressoDriverCaps, EspressoDriverOpts, W3CEspressoDriverCaps } from './types';
export declare class EspressoDriver extends AndroidDriver implements ExternalDriver<EspressoConstraints, string, StringRecord> {
_originalIme: string | null;
espresso: EspressoRunner;
wasAnimationEnabled?: boolean;
static newMethodMap: {
readonly '/session/:sessionId/appium/device/get_clipboard': {
readonly POST: {
readonly command: "getClipboard";
readonly payloadParams: {
readonly optional: readonly ["contentType"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/timeouts/implicit_wait': {
readonly POST: {
readonly command: "implicitWait";
readonly payloadParams: {
readonly required: readonly ["ms"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/ime/available_engines': {
readonly GET: {
readonly command: "availableIMEEngines";
};
};
readonly '/session/:sessionId/ime/active_engine': {
readonly GET: {
readonly command: "getActiveIMEEngine";
};
};
readonly '/session/:sessionId/ime/activated': {
readonly GET: {
readonly command: "isIMEActivated";
};
};
readonly '/session/:sessionId/ime/deactivate': {
readonly POST: {
readonly command: "deactivateIMEEngine";
};
};
readonly '/session/:sessionId/ime/activate': {
readonly POST: {
readonly command: "activateIMEEngine";
readonly payloadParams: {
readonly required: readonly ["engine"];
};
};
};
readonly '/session/:sessionId/window/:windowhandle/size': {
readonly GET: {
readonly command: "getWindowSize";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/keys': {
readonly POST: {
readonly command: "keys";
readonly payloadParams: {
readonly required: readonly ["value"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/element/:elementId/location': {
readonly GET: {
readonly command: "getLocation";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/element/:elementId/location_in_view': {
readonly GET: {
readonly command: "getLocationInView";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/element/:elementId/size': {
readonly GET: {
readonly command: "getSize";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/lock': {
readonly POST: {
readonly command: "lock";
readonly payloadParams: {
readonly optional: readonly ["seconds"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/unlock': {
readonly POST: {
readonly command: "unlock";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/is_locked': {
readonly POST: {
readonly command: "isLocked";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/start_recording_screen': {
readonly POST: {
readonly command: "startRecordingScreen";
readonly payloadParams: {
readonly optional: readonly ["options"];
};
};
};
readonly '/session/:sessionId/appium/stop_recording_screen': {
readonly POST: {
readonly command: "stopRecordingScreen";
readonly payloadParams: {
readonly optional: readonly ["options"];
};
};
};
readonly '/session/:sessionId/appium/performanceData/types': {
readonly POST: {
readonly command: "getPerformanceDataTypes";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/getPerformanceData': {
readonly POST: {
readonly command: "getPerformanceData";
readonly payloadParams: {
readonly required: readonly ["packageName", "dataType"];
readonly optional: readonly ["dataReadTimeout"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/press_keycode': {
readonly POST: {
readonly command: "pressKeyCode";
readonly payloadParams: {
readonly required: readonly ["keycode"];
readonly optional: readonly ["metastate", "flags"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/long_press_keycode': {
readonly POST: {
readonly command: "longPressKeyCode";
readonly payloadParams: {
readonly required: readonly ["keycode"];
readonly optional: readonly ["metastate", "flags"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/finger_print': {
readonly POST: {
readonly command: "fingerprint";
readonly payloadParams: {
readonly required: readonly ["fingerprintId"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/send_sms': {
readonly POST: {
readonly command: "sendSMS";
readonly payloadParams: {
readonly required: readonly ["phoneNumber", "message"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/gsm_call': {
readonly POST: {
readonly command: "gsmCall";
readonly payloadParams: {
readonly required: readonly ["phoneNumber", "action"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/gsm_signal': {
readonly POST: {
readonly command: "gsmSignal";
readonly payloadParams: {
readonly required: readonly ["signalStrength"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/gsm_voice': {
readonly POST: {
readonly command: "gsmVoice";
readonly payloadParams: {
readonly required: readonly ["state"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/power_capacity': {
readonly POST: {
readonly command: "powerCapacity";
readonly payloadParams: {
readonly required: readonly ["percent"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/power_ac': {
readonly POST: {
readonly command: "powerAC";
readonly payloadParams: {
readonly required: readonly ["state"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/network_speed': {
readonly POST: {
readonly command: "networkSpeed";
readonly payloadParams: {
readonly required: readonly ["netspeed"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/keyevent': {
readonly POST: {
readonly command: "keyevent";
readonly payloadParams: {
readonly required: readonly ["keycode"];
readonly optional: readonly ["metastate"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/current_activity': {
readonly GET: {
readonly command: "getCurrentActivity";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/current_package': {
readonly GET: {
readonly command: "getCurrentPackage";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/app_state': {
readonly POST: {
readonly command: "queryAppState";
readonly payloadParams: {
readonly required: readonly [readonly ["appId"], readonly ["bundleId"]];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/toggle_airplane_mode': {
readonly POST: {
readonly command: "toggleFlightMode";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/toggle_data': {
readonly POST: {
readonly command: "toggleData";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/toggle_wifi': {
readonly POST: {
readonly command: "toggleWiFi";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/toggle_location_services': {
readonly POST: {
readonly command: "toggleLocationServices";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/open_notifications': {
readonly POST: {
readonly command: "openNotifications";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/start_activity': {
readonly POST: {
readonly command: "startActivity";
readonly payloadParams: {
readonly required: readonly ["appPackage", "appActivity"];
readonly optional: readonly ["appWaitPackage", "appWaitActivity", "intentAction", "intentCategory", "intentFlags", "optionalIntentArguments", "dontStopAppOnReset"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/system_bars': {
readonly GET: {
readonly command: "getSystemBars";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/device/display_density': {
readonly GET: {
readonly command: "getDisplayDensity";
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/app/background': {
readonly POST: {
readonly command: "background";
readonly payloadParams: {
readonly required: readonly ["seconds"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/app/strings': {
readonly POST: {
readonly command: "getStrings";
readonly payloadParams: {
readonly optional: readonly ["language", "stringFile"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/element/:elementId/value': {
readonly POST: {
readonly command: "setValueImmediate";
readonly payloadParams: {
readonly required: readonly ["text"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/appium/element/:elementId/replace_value': {
readonly POST: {
readonly command: "replaceValue";
readonly payloadParams: {
readonly required: readonly ["text"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/network_connection': {
readonly GET: {
readonly command: "getNetworkConnection";
readonly deprecated: true;
};
readonly POST: {
readonly command: "setNetworkConnection";
readonly payloadParams: {
readonly unwrap: "parameters";
readonly required: readonly ["type"];
};
readonly deprecated: true;
};
};
readonly '/session/:sessionId/location': {
readonly GET: {
readonly command: "getGeoLocation";
readonly deprecated: true;
};
readonly POST: {
readonly command: "setGeoLocation";
readonly payloadParams: {
readonly required: readonly ["location"];
};
readonly deprecated: true;
};
};
};
static executeMethodMap: {
readonly 'mobile: swipe': {
readonly command: "mobileSwipe";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["direction", "swiper", "startCoordinates", "endCoordinates", "precisionDescriber"];
};
};
readonly 'mobile: scrollToPage': {
readonly command: "mobileScrollToPage";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["scrollTo", "scrollToPage", "smoothScroll"];
};
};
readonly 'mobile: navigateTo': {
readonly command: "mobileNavigateTo";
readonly params: {
readonly required: readonly ["elementId", "menuItemId"];
};
};
readonly 'mobile: clickAction': {
readonly command: "mobileClickAction";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["tapper", "coordinatesProvider", "precisionDescriber", "inputDevice", "buttonState"];
};
};
readonly 'mobile: deviceInfo': {
readonly command: "mobileGetDeviceInfo";
};
readonly 'mobile: isToastVisible': {
readonly command: "mobileIsToastVisible";
readonly params: {
readonly required: readonly ["text"];
readonly optional: readonly ["isRegexp"];
};
};
readonly 'mobile: openDrawer': {
readonly command: "mobileOpenDrawer";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["gravity"];
};
};
readonly 'mobile: closeDrawer': {
readonly command: "mobileCloseDrawer";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["gravity"];
};
};
readonly 'mobile: setDate': {
readonly command: "mobileSetDate";
readonly params: {
readonly required: readonly ["elementId", "year", "monthOfYear", "dayOfMonth"];
};
};
readonly 'mobile: setTime': {
readonly command: "mobileSetTime";
readonly params: {
readonly required: readonly ["elementId", "hours", "minutes"];
};
};
readonly 'mobile: backdoor': {
readonly command: "mobileBackdoor";
readonly params: {
readonly required: readonly ["target", "methods"];
readonly optional: readonly ["elementId"];
};
};
readonly 'mobile: flashElement': {
readonly command: "mobileFlashElement";
readonly params: {
readonly required: readonly ["elementId"];
readonly optional: readonly ["durationMillis", "repeatCount"];
};
};
readonly 'mobile: uiautomator': {
readonly command: "mobileUiautomator";
readonly params: {
readonly required: readonly ["strategy", "locator", "action"];
readonly optional: readonly ["index"];
};
};
readonly 'mobile: uiautomatorPageSource': {
readonly command: "mobileUiautomatorPageSource";
};
readonly 'mobile: webAtoms': {
readonly command: "mobileWebAtoms";
readonly params: {
readonly required: readonly ["webviewEl", "forceJavascriptEnabled", "methodChain"];
};
};
readonly 'mobile: dismissAutofill': {
readonly command: "mobileDismissAutofill";
readonly params: {
readonly required: readonly ["elementId"];
};
};
readonly 'mobile: registerIdlingResources': {
readonly command: "mobileRegisterIdlingResources";
readonly params: {
readonly required: readonly ["classNames"];
};
};
readonly 'mobile: unregisterIdlingResources': {
readonly command: "mobileUnregisterIdlingResources";
readonly params: {
readonly required: readonly ["classNames"];
};
};
readonly 'mobile: listIdlingResources': {
readonly command: "mobileListIdlingResources";
};
readonly 'mobile: waitForUIThread': {
readonly command: "mobileWaitForUIThread";
};
readonly 'mobile: pressKey': {
readonly command: "mobilePressKey";
readonly params: {
readonly required: readonly ["keycode"];
readonly optional: readonly ["metastate", "flags", "isLongPress"];
};
};
readonly 'mobile: setClipboard': {
readonly command: "mobileSetClipboard";
readonly params: {
readonly required: readonly ["content"];
readonly optional: readonly ["contentType", "label"];
};
};
readonly 'mobile: getClipboard': {
readonly command: "mobileGetClipboard";
};
readonly 'mobile: startService': {
readonly command: "mobileStartService";
readonly params: {
readonly required: readonly ["intent"];
readonly optional: readonly ["user", "foreground"];
};
};
readonly 'mobile: stopService': {
readonly command: "mobileStopService";
readonly params: {
readonly required: readonly ["intent"];
readonly optional: readonly ["user"];
};
};
readonly 'mobile: startActivity': {
readonly command: "mobileStartActivity";
readonly params: {
readonly required: readonly ["appActivity"];
readonly optional: readonly ["locale", "optionalIntentArguments", "optionalActivityArguments"];
};
};
readonly 'mobile: shell': {
readonly command: "mobileShell";
readonly params: {
readonly required: readonly ["command"];
readonly optional: readonly ["args", "timeout", "includeStderr"];
};
};
readonly 'mobile: execEmuConsoleCommand': {
readonly command: "mobileExecEmuConsoleCommand";
readonly params: {
readonly required: readonly ["command"];
readonly optional: readonly ["execTimeout", "connTimeout", "initTimeout"];
};
};
readonly 'mobile: startLogsBroadcast': {
readonly command: "mobileStartLogsBroadcast";
};
readonly 'mobile: stopLogsBroadcast': {
readonly command: "mobileStopLogsBroadcast";
};
readonly 'mobile: changePermissions': {
readonly command: "mobileChangePermissions";
readonly params: {
readonly required: readonly ["permissions"];
readonly optional: readonly ["appPackage", "action", "target"];
};
};
readonly 'mobile: getPermissions': {
readonly command: "mobileGetPermissions";
readonly params: {
readonly optional: readonly ["type", "appPackage"];
};
};
readonly 'mobile: performEditorAction': {
readonly command: "mobilePerformEditorAction";
readonly params: {
readonly required: readonly ["action"];
};
};
readonly 'mobile: getDeviceTime': {
readonly command: "mobileGetDeviceTime";
readonly params: {
readonly optional: readonly ["format"];
};
};
readonly 'mobile: startScreenStreaming': {
readonly command: "mobileStartScreenStreaming";
readonly params: {
readonly optional: readonly ["width", "height", "bitRate", "host", "port", "pathname", "tcpPort", "quality", "considerRotation", "logPipelineDetails"];
};
};
readonly 'mobile: stopScreenStreaming': {
readonly command: "mobileStopScreenStreaming";
};
readonly 'mobile: getNotifications': {
readonly command: "mobileGetNotifications";
};
readonly 'mobile: listSms': {
readonly command: "mobileListSms";
};
readonly 'mobile: pushFile': {
readonly command: "pushFile";
readonly params: {
readonly required: readonly ["remotePath", "payload"];
};
};
readonly 'mobile: pullFolder': {
readonly command: "pullFolder";
readonly params: {
readonly required: readonly ["remotePath"];
};
};
readonly 'mobile: pullFile': {
readonly command: "pullFile";
readonly params: {
readonly required: readonly ["remotePath"];
};
};
readonly 'mobile: deleteFile': {
readonly command: "mobileDeleteFile";
readonly params: {
readonly required: readonly ["remotePath"];
};
};
readonly 'mobile: isAppInstalled': {
readonly command: "mobileIsAppInstalled";
readonly params: {
readonly required: readonly ["appId"];
readonly optional: readonly ["user"];
};
};
readonly 'mobile: queryAppState': {
readonly command: "queryAppState";
readonly params: {
readonly required: readonly ["appId"];
};
};
readonly 'mobile: activateApp': {
readonly command: "activateApp";
readonly params: {
readonly required: readonly ["appId"];
};
};
readonly 'mobile: removeApp': {
readonly command: "mobileRemoveApp";
readonly params: {
readonly required: readonly ["appId"];
readonly optional: readonly ["timeout", "keepData", "skipInstallCheck"];
};
};
readonly 'mobile: terminateApp': {
readonly command: "mobileTerminateApp";
readonly params: {
readonly required: readonly ["appId"];
readonly optional: readonly ["timeout"];
};
};
readonly 'mobile: installApp': {
readonly command: "mobileInstallApp";
readonly params: {
readonly required: readonly ["appPath"];
readonly optional: readonly ["checkVersion", "timeout", "allowTestPackages", "useSdcard", "grantPermissions", "replace", "noIncremental"];
};
};
readonly 'mobile: clearApp': {
readonly command: "mobileClearApp";
readonly params: {
readonly required: readonly ["appId"];
};
};
readonly 'mobile: backgroundApp': {
readonly command: "mobileBackgroundApp";
readonly params: {
readonly optional: readonly ["seconds"];
};
};
readonly 'mobile: broadcast': {
readonly command: "mobileBroadcast";
readonly params: {
readonly optional: readonly ["receiverPermission", "allowBackgroundActivityStarts", "user", "intent", "action", "package", "uri", "mimeType", "identifier", "component", "categories", "extras", "flags"];
};
};
readonly 'mobile: getContexts': {
readonly command: "mobileGetContexts";
readonly params: {
readonly optional: readonly ["waitForWebviewMs"];
};
};
readonly 'mobile: lock': {
readonly command: "lock";
readonly params: {
readonly optional: readonly ["seconds"];
};
};
readonly 'mobile: unlock': {
readonly command: "mobileUnlock";
readonly params: {
readonly optional: readonly ["key", "type", "strategy", "timeoutMs"];
};
};
readonly 'mobile: isLocked': {
readonly command: "isLocked";
};
readonly 'mobile: refreshGpsCache': {
readonly command: "mobileRefreshGpsCache";
readonly params: {
readonly optional: readonly ["timeoutMs"];
};
};
readonly 'mobile: startMediaProjectionRecording': {
readonly command: "mobileStartMediaProjectionRecording";
readonly params: {
readonly optional: readonly ["resolution", "priority", "maxDurationSec", "filename"];
};
};
readonly 'mobile: isMediaProjectionRecordingRunning': {
readonly command: "mobileIsMediaProjectionRecordingRunning";
};
readonly 'mobile: stopMediaProjectionRecording': {
readonly command: "mobileStopMediaProjectionRecording";
readonly params: {
readonly optional: readonly ["remotePath", "user", "pass", "method", "headers", "fileFieldName", "formFields", "uploadTimeout"];
};
};
readonly 'mobile: getConnectivity': {
readonly command: "mobileGetConnectivity";
readonly params: {
readonly optional: readonly ["services"];
};
};
readonly 'mobile: setConnectivity': {
readonly command: "mobileSetConnectivity";
readonly params: {
readonly optional: readonly ["wifi", "data", "airplaneMode"];
};
};
readonly 'mobile: hideKeyboard': {
readonly command: "hideKeyboard";
};
readonly 'mobile: isKeyboardShown': {
readonly command: "isKeyboardShown";
};
readonly 'mobile: deviceidle': {
readonly command: "mobileDeviceidle";
readonly params: {
readonly required: readonly ["action"];
readonly optional: readonly ["packages"];
};
};
readonly 'mobile: bluetooth': {
readonly command: "mobileBluetooth";
readonly params: {
readonly required: readonly ["action"];
};
};
readonly 'mobile: nfc': {
readonly command: "mobileNfc";
readonly params: {
readonly required: readonly ["action"];
};
};
readonly 'mobile: setUiMode': {
readonly command: "mobileSetUiMode";
readonly params: {
readonly required: readonly ["mode", "value"];
};
};
readonly 'mobile: getUiMode': {
readonly command: "mobileGetUiMode";
readonly params: {
readonly required: readonly ["mode"];
};
};
readonly 'mobile: injectEmulatorCameraImage': {
readonly command: "mobileInjectEmulatorCameraImage";
readonly params: {
readonly required: readonly ["payload"];
};
};
readonly 'mobile: sendTrimMemory': {
readonly command: "mobileSendTrimMemory";
readonly params: {
readonly required: readonly ["pkg", "level"];
};
};
readonly 'mobile: getPerformanceData': {
readonly command: "mobileGetPerformanceData";
readonly params: {
readonly required: readonly ["packageName", "dataType"];
};
};
readonly 'mobile: getPerformanceDataTypes': {
readonly command: "getPerformanceDataTypes";
};
readonly 'mobile: toggleGps': {
readonly command: "toggleLocationServices";
};
readonly 'mobile: isGpsEnabled': {
readonly command: "isLocationServicesEnabled";
};
readonly 'mobile: getDisplayDensity': {
readonly command: "getDisplayDensity";
};
readonly 'mobile: getSystemBars': {
readonly command: "getSystemBars";
};
readonly 'mobile: statusBar': {
readonly command: "mobilePerformStatusBarCommand";
readonly params: {
readonly required: readonly ["command"];
readonly optional: readonly ["component"];
};
};
readonly 'mobile: fingerprint': {
readonly command: "mobileFingerprint";
readonly params: {
readonly required: readonly ["fingerprintId"];
};
};
readonly 'mobile: sendSms': {
readonly command: "mobileSendSms";
readonly params: {
readonly required: readonly ["phoneNumber", "message"];
};
};
readonly 'mobile: gsmCall': {
readonly command: "mobileGsmCall";
readonly params: {
readonly required: readonly ["phoneNumber", "action"];
};
};
readonly 'mobile: gsmSignal': {
readonly command: "mobileGsmSignal";
readonly params: {
readonly required: readonly ["strength"];
};
};
readonly 'mobile: gsmVoice': {
readonly command: "mobileGsmVoice";
readonly params: {
readonly required: readonly ["state"];
};
};
readonly 'mobile: powerAc': {
readonly command: "mobilePowerAc";
readonly params: {
readonly required: readonly ["state"];
};
};
readonly 'mobile: powerCapacity': {
readonly command: "mobilePowerCapacity";
readonly params: {
readonly required: readonly ["percent"];
};
};
readonly 'mobile: networkSpeed': {
readonly command: "mobileNetworkSpeed";
readonly params: {
readonly required: readonly ["speed"];
};
};
readonly 'mobile: sensorSet': {
readonly command: "sensorSet";
readonly params: {
readonly required: readonly ["sensorType", "value"];
};
};
readonly 'mobile: getCurrentActivity': {
readonly command: "getCurrentActivity";
};
readonly 'mobile: getCurrentPackage': {
readonly command: "getCurrentPackage";
};
readonly 'mobile: setGeolocation': {
readonly command: "mobileSetGeolocation";
readonly params: {
readonly required: readonly ["latitude", "longitude"];
readonly optional: readonly ["altitude", "satellites", "speed", "bearing", "accuracy"];
};
};
readonly 'mobile: getGeolocation': {
readonly command: "mobileGetGeolocation";
};
readonly 'mobile: resetGeolocation': {
readonly command: "mobileResetGeolocation";
};
readonly 'mobile: getAppStrings': {
readonly command: "getStrings";
readonly params: {
readonly optional: readonly ["language"];
};
};
};
caps: EspressoDriverCaps;
opts: EspressoDriverOpts;
desiredCapConstraints: EspressoConstraints;
constructor(opts?: InitialOpts, shouldValidateCaps?: boolean);
getSession(): Promise<SingularSessionData<EspressoConstraints>>;
createSession(w3cCaps1: W3CEspressoDriverCaps, w3cCaps2?: W3CEspressoDriverCaps, w3cCaps3?: W3CEspressoDriverCaps, driverData?: DriverData[]): Promise<any>;
/**
* Unzip the given app path and return the first package that has SUPPORTED_EXTENSIONS
* in the archived file.
*
* @param {string} appPath The path to app file.
* @returns {Promise<string>} Returns the path to an unzipped app file path.
* @throws Raise an exception if the zip did not have any SUPPORTED_EXTENSIONS packages.
*/
unzipApp(appPath: string): Promise<string>;
onPostConfigureApp({ cachedAppInfo, isUrl, appPath }: {
cachedAppInfo: any;
isUrl: any;
appPath: any;
}): Promise<false | {
appPath: null;
}>;
get driverData(): {};
startEspressoSession(): Promise<void>;
/**
* Turn on or off animation scale.
* '--no-window-animation' instrument argument for Espresso disables window animations,
* but it does not bring the animation scale back to the pre-instrument process start state in Espresso
* unlike Appium UIA2 driver case. We want to disable/enable the animation scale only in an appium espresso session as possible.
* @param isEnabled
*/
setWindowAnimationState(isEnabled: boolean): Promise<void>;
initWebview(): Promise<void>;
addDeviceInfoToCaps(): Promise<void>;
initEspressoServer(): void;
initAUT(): Promise<void>;
deleteSession(): Promise<void>;
onSettingsUpdate(): Promise<void>;
proxyActive(sessionId: any): boolean;
canProxy(sessionId: any): boolean;
getProxyAvoidList(sessionId: any): RouteMatcher[];
get appOnDevice(): boolean;
performActions: typeof actionsCmds.performActions;
startActivity: typeof appManagementCmds.startActivity;
mobileStartActivity: typeof appManagementCmds.mobileStartActivity;
mobileWebAtoms: typeof contextCmds.mobileWebAtoms;
suspendChromedriverProxy: typeof contextCmds.suspendChromedriverProxy;
mobilePerformEditorAction: typeof elementCmds.mobilePerformEditorAction;
mobileSwipe: typeof elementCmds.mobileSwipe;
mobileOpenDrawer: typeof elementCmds.mobileOpenDrawer;
mobileCloseDrawer: typeof elementCmds.mobileCloseDrawer;
mobileSetDate: typeof elementCmds.mobileSetDate;
mobileSetTime: typeof elementCmds.mobileSetTime;
mobileNavigateTo: typeof elementCmds.mobileNavigateTo;
mobileScrollToPage: typeof elementCmds.mobileScrollToPage;
mobileFlashElement: typeof elementCmds.mobileFlashElement;
mobileClickAction: typeof elementCmds.mobileClickAction;
mobileDismissAutofill: typeof elementCmds.mobileDismissAutofill;
mobilePressKey: typeof miscCmds.mobilePressKey;
mobileGetDeviceInfo: typeof miscCmds.mobileGetDeviceInfo;
mobileIsToastVisible: typeof miscCmds.mobileIsToastVisible;
getDisplayDensity: typeof miscCmds.getDisplayDensity;
mobileBackdoor: typeof miscCmds.mobileBackdoor;
mobileUiautomator: typeof miscCmds.mobileUiautomator;
mobileUiautomatorPageSource: typeof miscCmds.mobileUiautomatorPageSource;
updateSettings: typeof miscCmds.updateSettings;
getSettings: typeof miscCmds.getSettings;
getClipboard: typeof clipboardCmds.getClipboard;
mobileGetClipboard: typeof clipboardCmds.getClipboard;
mobileSetClipboard: typeof clipboardCmds.mobileSetClipboard;
mobileStartService: typeof servicesCmds.mobileStartService;
mobileStopService: typeof servicesCmds.mobileStopService;
getScreenshot: typeof screenshotCmds.getScreenshot;
mobileScreenshots: typeof screenshotCmds.mobileScreenshots;
mobileRegisterIdlingResources: typeof idlingResourcesCmds.mobileRegisterIdlingResources;
mobileUnregisterIdlingResources: typeof idlingResourcesCmds.mobileUnregisterIdlingResources;
mobileListIdlingResources: typeof idlingResourcesCmds.mobileListIdlingResources;
mobileWaitForUIThread: typeof idlingResourcesCmds.mobileWaitForUIThread;
}
export default EspressoDriver;
//# sourceMappingURL=driver.d.ts.map