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

Function waitForUiElement

scripts/integration/cli.mjs:1209–1227  ·  view source on GitHub ↗
(label, selector, options = {})

Source from the content-addressed store, hash-verified

1207}
1208
1209async function waitForUiElement(label, selector, options = {}) {
1210 return retryHttpJson(
1211 "POST",
1212 `/api/simulators/${simulatorUDID}/action`,
1213 {
1214 action: "waitFor",
1215 source: "native-ax",
1216 maxDepth: options.maxDepth ?? 3,
1217 timeoutMs: options.waitTimeoutMs ?? 5_000,
1218 pollMs: options.pollMs ?? 250,
1219 selector,
1220 },
1221 `${label} wait-for ${JSON.stringify(selector)}`,
1222 {
1223 attempts: 1,
1224 maxElapsedMs: options.waitMaxElapsedMs ?? httpActionBudgetMs,
1225 },
1226 );
1227}
1228
1229async function waitForUiText(label, text, options = {}) {
1230 const timeoutMs = options.waitTimeoutMs ?? 5_000;

Callers 1

verifyUiFunction · 0.85

Calls 1

retryHttpJsonFunction · 0.85

Tested by

no test coverage detected