appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
33 lines • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HidIndigoClient = void 0;
/**
* HID Indigo service on real hardware.
*
* Requires **iOS/tvOS 26+** and the optional **`appium-ios-remotexpc`** package.
*/
class HidIndigoClient {
udid;
remoteXPCFacade;
constructor(udid, remoteXPCFacade) {
this.udid = udid;
this.remoteXPCFacade = remoteXPCFacade;
}
async pressButtonByName(name, options) {
await this.withHidIndigoService((hidIndigoService) => hidIndigoService.pressButton(name, options));
}
async pressButtonByPageAndUsage(usagePage, usageCode, options) {
await this.withHidIndigoService((hidIndigoService) => hidIndigoService.pressButton(usagePage, usageCode, options));
}
async withHidIndigoService(operation) {
const hidIndigoService = await this.remoteXPCFacade.requireService('HID Indigo', (Services) => Services.startHidIndigoService(this.udid));
try {
await operation(hidIndigoService);
}
finally {
await hidIndigoService.close();
}
}
}
exports.HidIndigoClient = HidIndigoClient;
//# sourceMappingURL=hid-indigo-client.js.map