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

Function fetchAccessibilityTree

packages/client/src/api/simulators.ts:63–79  ·  view source on GitHub ↗
(
  udid: string,
  source: AccessibilitySourcePreference = "auto",
  options: { maxDepth?: number } = {},
)

Source from the content-addressed store, hash-verified

61}
62
63export async function fetchAccessibilityTree(
64 udid: string,
65 source: AccessibilitySourcePreference = "auto",
66 options: { maxDepth?: number } = {},
67): Promise<AccessibilityTreeResponse> {
68 const params = new URLSearchParams();
69 if (source !== "auto") {
70 params.set("source", source);
71 }
72 if (options.maxDepth != null) {
73 params.set("maxDepth", String(options.maxDepth));
74 }
75 const query = params.size > 0 ? `?${params}` : "";
76 return apiRequest<AccessibilityTreeResponse>(
77 `/api/simulators/${udid}/accessibility-tree${query}`,
78 );
79}
80
81export async function fetchAccessibilityPoint(
82 udid: string,

Callers 1

AppShellFunction · 0.90

Calls 2

apiRequestFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected