UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

33 lines (32 loc) 1.39 kB
type KeyName = "back" | "home" | "volumeUp" | "volumeDown" | "VolumeMute" | "power" | "enter" | "space" | "delete" | "menu" | "search" | "camera" | "focus" | "notification" | "call" | "calendar" | "recent" | "settings"; /** * @class android * @memberof mobile */ export declare class Android { private vlf; private ErrorHandler; /** * @function pressKeyByName * @memberof mobile.android * @description Simulate pressing a hardware key on the android device (e.g., back button, home button, etc.), * @param {string} keyName - The name of the key (e.g., "back", "home", "volumeUp", etc.) * @returns {Promise<void>} * @example * await mobile.android.pressKeyByName("back"); * await mobile.android.pressKeyByName("home"); */ pressKeyByName(keyName: KeyName): Promise<void>; /** * @function pressKeyByCode * @memberof mobile.android * @description Simulate pressing a hardware key on the android device (e.g., back button, home button, etc.), * @param {string} keyCode - The code of the key (e.g., 4 (back), 3 (home) , etc.) * @returns {Promise<void>} * @example await mobile.android.pressKeyByCode(4); * @see https://developer.android.com/reference/android/view/KeyEvent */ pressKeyByCode(keyCode: number): Promise<void>; } declare const _default: Android; export default _default;