MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / resolveKeyboardTipPrompt

Function resolveKeyboardTipPrompt

scripts/integration/js-api.mjs:394–417  ·  view source on GitHub ↗
(label)

Source from the content-addressed store, hash-verified

392}
393
394async 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
419async function safeQuery(selector, options = {}) {
420 try {

Callers 1

Calls 5

safeQueryFunction · 0.85
logMethod · 0.80
sleepFunction · 0.70

Tested by

no test coverage detected