appium-mac2-driver
Version:
XCTest-based Appium driver for macOS apps automation
56 lines • 3.06 kB
TypeScript
/**
* Start an app with given bundle identifier or activates it
* if the app is already running. An exception is thrown if the
* app with the given identifier cannot be found.
*
* @this {Mac2Driver}
* @param {string} [bundleId] Bundle identifier of the app to be launched or activated.
* Either this property or `path` must be provided
* @param {string} [path] Full path to the app bundle. Either this property or
* `bundleId` must be provided
* @param {string[]} [args] The list of command line arguments for the app to be launched with.
* This parameter is ignored if the app is already running.
* @param {import('@appium/types').StringRecord} [environment] Environment variables mapping.
* Custom variables are added to the default process environment.
*/
export function macosLaunchApp(this: import("../driver").Mac2Driver, bundleId?: string, path?: string, args?: string[], environment?: import("@appium/types").StringRecord): Promise<any>;
/**
* Activate an app with given bundle identifier. An exception is thrown if the
* app cannot be found or is not running.
*
* @this {Mac2Driver}
* @param {string} [bundleId] Bundle identifier of the app to be activated.
* Either this property or `path` must be provided
* @param {string} [path] Full path to the app bundle. Either this property
* or `bundleId` must be provided
*/
export function macosActivateApp(this: import("../driver").Mac2Driver, bundleId?: string, path?: string): Promise<any>;
/**
* Terminate an app with given bundle identifier. An exception is thrown if the
* app cannot be found.
*
* @this {Mac2Driver}
* @param {string} [bundleId] Bundle identifier of the app to be terminated.
* Either this property or `path` must be provided
* @param {string} [path] Full path to the app bundle. Either this property
* or `bundleId` must be provided
* @returns {Promise<boolean>} `true` if the app was running and has been successfully terminated.
* `false` if the app was not running before.
*/
export function macosTerminateApp(this: import("../driver").Mac2Driver, bundleId?: string, path?: string): Promise<boolean>;
/**
* Query an app state with given bundle identifier. An exception is thrown if the
* app cannot be found.
*
* @this {Mac2Driver}
* @param {string} [bundleId] Bundle identifier of the app whose state should be queried.
* Either this property or `path` must be provided
* @param {string} [path] Full path to the app bundle. Either this property
* or `bundleId` must be provided
* @returns {Promise<number>} The application state code. See
* https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
* for more details
*/
export function macosQueryAppState(this: import("../driver").Mac2Driver, bundleId?: string, path?: string): Promise<number>;
export type Mac2Driver = import("../driver").Mac2Driver;
//# sourceMappingURL=app-management.d.ts.map