MCPcopy Index your code
hub / github.com/callstack/agent-device / queryDirectIosSelector

Function queryDirectIosSelector

src/daemon/selector-runtime.ts:347–373  ·  view source on GitHub ↗
(
  params: SelectorRuntimeParams,
  session: SessionState,
  selector: DirectIosSelectorTarget,
)

Source from the content-addressed store, hash-verified

345}
346
347async function queryDirectIosSelector(
348 params: SelectorRuntimeParams,
349 session: SessionState,
350 selector: DirectIosSelectorTarget,
351): Promise<DirectIosSelectorQueryResult> {
352 const data = await runAppleRunnerCommand(
353 session.device,
354 {
355 command: 'querySelector',
356 selectorKey: selector.key,
357 selectorValue: selector.value,
358 appBundleId: session.appBundleId,
359 },
360 buildAppleRunnerRequestOptions({
361 req: params.req,
362 logPath: params.logPath,
363 traceLogPath: session.trace?.outPath,
364 }),
365 );
366 const found = data.found === true;
367 const node = readDirectIosSelectorNode(data);
368 return {
369 found,
370 ...(typeof data.text === 'string' ? { text: data.text } : {}),
371 ...(node ? { node } : {}),
372 };
373}
374
375async function queryDirectIosSelectorOrFallback(
376 params: SelectorRuntimeParams,

Callers 1

Calls 3

runAppleRunnerCommandFunction · 0.90

Tested by

no test coverage detected