fix(android): add mouse click and keyboard press for input handling (#645)

* fix(android): add mouse click and keyboard press for input handling in index.ts

* fix(android): add check for soft keyboard presence before mouse click in index.ts
This commit is contained in:
Leyang 2025-04-27 13:32:00 +08:00 committed by GitHub
parent e1f708740f
commit b2ac7e710d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -356,6 +356,12 @@ ${Object.keys(size)
await adb.shell(
'app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -keyboard "~CLEAR~"',
);
if (await adb.isSoftKeyboardPresent()) {
return;
}
await this.mouse.click(element.center[0], element.center[1]);
}
private async forceScreenshot(path: string): Promise<void> {