mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-12-28 23:49:32 +00:00
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:
parent
e1f708740f
commit
b2ac7e710d
@ -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> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user