(label)
| 392 | } |
| 393 | |
| 394 | async function resolveKeyboardTipPrompt(label) { |
| 395 | const snapshot = await safeQuery({}, { maxDepth: 8 }); |
| 396 | if (!looksLikeKeyboardTipQuery(snapshot)) { |
| 397 | return; |
| 398 | } |
| 399 | |
| 400 | console.log(`[prompt] handling keyboard-tip prompt during ${label}`); |
| 401 | const target = keyboardTipContinueTapTarget(snapshot); |
| 402 | if (target) { |
| 403 | await session.tap(simulatorUDID, target.x, target.y); |
| 404 | } else { |
| 405 | await session.tapElement( |
| 406 | simulatorUDID, |
| 407 | { label: "Continue" }, |
| 408 | { |
| 409 | source: "native-ax", |
| 410 | maxDepth: 8, |
| 411 | waitTimeoutMs: 2_000, |
| 412 | durationMs: 80, |
| 413 | }, |
| 414 | ); |
| 415 | } |
| 416 | await sleep(500); |
| 417 | } |
| 418 | |
| 419 | async function safeQuery(selector, options = {}) { |
| 420 | try { |
no test coverage detected