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

Function openUrlPromptActions

scripts/integration/cli.mjs:1393–1452  ·  view source on GitHub ↗
(snapshot)

Source from the content-addressed store, hash-verified

1391}
1392
1393function openUrlPromptActions(snapshot) {
1394 const actions = [
1395 {
1396 label: "key enter",
1397 run: () =>
1398 simdeckJson(["key", simulatorUDID, "enter"], { timeoutMs: 60_000 }),
1399 },
1400 {
1401 label: "tap Open by label",
1402 run: () =>
1403 simdeckJson(
1404 [
1405 "tap",
1406 simulatorUDID,
1407 "--label",
1408 "Open",
1409 "--wait-timeout-ms",
1410 "5000",
1411 ],
1412 { timeoutMs: 60_000 },
1413 ),
1414 },
1415 ];
1416 for (const point of openButtonCandidatePoints(snapshot)) {
1417 actions.push({
1418 label: `tap Open at ${point.x},${point.y}`,
1419 run: () =>
1420 simdeckJson(
1421 [
1422 "tap",
1423 simulatorUDID,
1424 String(point.x),
1425 String(point.y),
1426 "--duration-ms",
1427 "80",
1428 ],
1429 { timeoutMs: 60_000 },
1430 ),
1431 });
1432 }
1433 for (const point of openButtonCandidateNormalizedPoints(snapshot)) {
1434 actions.push({
1435 label: `tap Open normalized ${point.x.toFixed(3)},${point.y.toFixed(3)}`,
1436 run: () =>
1437 simdeckJson(
1438 [
1439 "tap",
1440 simulatorUDID,
1441 String(point.x),
1442 String(point.y),
1443 "--normalized",
1444 "--duration-ms",
1445 "80",
1446 ],
1447 { timeoutMs: 60_000 },
1448 ),
1449 });
1450 }

Callers 1

Calls 3

simdeckJsonFunction · 0.70

Tested by

no test coverage detected