UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

33 lines 1.81 kB
import type { HidButtonName } from 'appium-ios-remotexpc'; import type { XCUITestDriver } from '../driver'; import { HIDPageEvent } from './hid-event'; /** * Emulates triggering of the given low-level IO HID device event. * * Popular constants: * - `kHIDPage_Consumer` = `0x0C` * - `kHIDUsage_Csmr_VolumeIncrement` = `0xE9` (Volume Up) * - `kHIDUsage_Csmr_VolumeDecrement` = `0xEA` (Volume Down) * - `kHIDUsage_Csmr_Menu` = `0x40` (Home) * - `kHIDUsage_Csmr_Power` = `0x30` (Power) * - `kHIDUsage_Csmr_Snapshot` = `0x65` (Power + Home) * * @param page - The event page identifier * @param usage - The event usage identifier (usages are defined per-page) * @param durationSeconds - The event duration in float seconds (XCTest uses `0.005` for a single press event) */ export declare function mobilePerformIoHidEvent(this: XCUITestDriver, page: HIDPageEvent, usage: number, durationSeconds: number | string): Promise<void>; /** * Emulates triggering of the given low-level IO HID device event * via the HID Indigo RemoteXPC service. * * Requires **iOS/tvOS 26+**, real device, and a running RemoteXPC tunnel. * * @param name - The name of the button to press. Either this or both `page` and `usage` must be provided. * @param page - The page of the button to press. Either this or `name` must be provided. * @param usage - The usage of the button to press. Either this or `name` must be provided. * @param durationSeconds - The duration of the button press in float seconds. * @param pressCount - The number of times to press the button. */ export declare function mobilePerformIndigoHidEvent(this: XCUITestDriver, name?: HidButtonName, page?: number, usage?: number, durationSeconds?: number | string, pressCount?: number | string): Promise<void>; //# sourceMappingURL=iohid.d.ts.map