webdriverio
Version:
Next-gen browser and mobile automation test framework for Node.js
59 lines • 2.06 kB
TypeScript
export interface StartActivityOptions {
/**
* The package name of the app to start.
*/
appPackage: string;
/**
* The activity name to start.
*/
appActivity: string;
/**
* The intent action to use to start the activity (maps to `action` in the new driver API).
*/
intentAction?: string;
/**
* The intent category to use to start the activity (maps to `categories` in the new driver API).
*/
intentCategory?: string;
/**
* Flags to use when starting the activity (maps to `flags` in the new driver API).
*/
intentFlags?: string;
/**
* Whether to stop the app before starting the activity. Passed as `stop` (inverted) to the new driver API.
*/
dontStopAppOnReset?: string;
}
/**
*
* Start an Android activity by providing package name and activity name.
*
* <example>
:startActivity.js
it('should start an Android activity', async () => {
await browser.startActivity({
appPackage: 'com.example.app',
appActivity: '.MainActivity',
})
await browser.startActivity({
appPackage: 'com.example.app',
appActivity: '.MainActivity',
intentAction: 'android.intent.action.MAIN',
intentCategory: 'android.intent.category.LAUNCHER',
intentFlags: '0x10200000',
})
})
* </example>
*
* @param {StartActivityOptions} options activity options
* @param {string} options.appPackage package name of the app to start
* @param {string} options.appActivity activity name to start
* @param {string=} options.intentAction intent action
* @param {string=} options.intentCategory intent category
* @param {string=} options.intentFlags flags for the intent
* @param {string=} options.dontStopAppOnReset whether to stop the app before starting the activity
*
* @support ["android"]
*/
export declare function startActivity(this: WebdriverIO.Browser, options: StartActivityOptions): Promise<unknown>;
//# sourceMappingURL=startActivity.d.ts.map