(
udid: string,
x: number,
y: number,
options: RequestInit & { maxDepth?: number } = {},
)
| 79 | } |
| 80 | |
| 81 | export async function fetchAccessibilityPoint( |
| 82 | udid: string, |
| 83 | x: number, |
| 84 | y: number, |
| 85 | options: RequestInit & { maxDepth?: number } = {}, |
| 86 | ): Promise<AccessibilityTreeResponse> { |
| 87 | const { maxDepth, ...requestOptions } = options; |
| 88 | const params = new URLSearchParams({ |
| 89 | x: String(x), |
| 90 | y: String(y), |
| 91 | }); |
| 92 | if (maxDepth != null) { |
| 93 | params.set("maxDepth", String(maxDepth)); |
| 94 | } |
| 95 | return apiRequest<AccessibilityTreeResponse>( |
| 96 | `/api/simulators/${encodeURIComponent(udid)}/accessibility-point?${params}`, |
| 97 | requestOptions, |
| 98 | ); |
| 99 | } |
| 100 | |
| 101 | export async function fetchSimulatorLogs( |
| 102 | udid: string, |
no test coverage detected