UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

77 lines 3.16 kB
import type { AndroidDriver } from '../driver'; import type { SendKeysOpts } from './types'; /** * Hides the on-screen keyboard. * * @returns Promise that resolves to `true` if the keyboard was hidden, `false` otherwise. */ export declare function hideKeyboard(this: AndroidDriver): Promise<boolean>; /** * Checks if the on-screen keyboard is currently shown. * * @returns Promise that resolves to `true` if the keyboard is shown, `false` otherwise. */ export declare function isKeyboardShown(this: AndroidDriver): Promise<boolean>; /** * Sends keys to the active element. * * @param keys The keys to send, either as a string or an array of strings (which will be joined). * @returns Promise that resolves when the keys are sent. */ export declare function keys(this: AndroidDriver, keys: string | string[]): Promise<void>; /** * Sends keys to the active element. * * @param params The parameters for sending keys. * @returns Promise that resolves when the keys are sent. * @throws {errors.NotImplementedError} This method is not implemented. */ export declare function doSendKeys(this: AndroidDriver, params: SendKeysOpts): Promise<void>; /** * Sends a key event to the device. * * @deprecated Use {@link pressKeyCode} instead. * @param keycode The key code to press. * @param metastate Optional meta state flags. * @returns Promise that resolves when the key event is sent. */ export declare function keyevent(this: AndroidDriver, keycode: string | number, metastate?: number): Promise<void>; /** * Presses a key code on the device. * * @param keycode The key code to press. * @param metastate Optional meta state flags. * @returns Promise that resolves when the key code is pressed. * @throws {errors.NotImplementedError} This method is not implemented. */ export declare function pressKeyCode(this: AndroidDriver, keycode: string | number, metastate?: number): Promise<void>; /** * Long presses a key code on the device. * * @param keycode The key code to long press. * @param metastate Optional meta state flags. * @returns Promise that resolves when the key code is long pressed. * @throws {errors.NotImplementedError} This method is not implemented. */ export declare function longPressKeyCode(this: AndroidDriver, keycode: string | number, metastate?: number): Promise<void>; /** * Performs an editor action on the active input field. * * @param action The editor action to perform (e.g., 'done', 'go', 'next'). * @returns Promise that resolves when the editor action is performed. */ export declare function mobilePerformEditorAction(this: AndroidDriver, action: string | number): Promise<void>; /** * Initializes Unicode keyboard support. * * @deprecated * @returns Promise that resolves to the default IME identifier that was active before. */ export declare function initUnicodeKeyboard(this: AndroidDriver): Promise<string | null>; /** * Hides the on-screen keyboard completely by setting IME to empty. * * @returns Promise that resolves when the keyboard is hidden. */ export declare function hideKeyboardCompletely(this: AndroidDriver): Promise<void>; //# sourceMappingURL=keyboard.d.ts.map