MCPcopy Create free account
hub / github.com/callstack/agent-device / buildDirectIosIsResult

Function buildDirectIosIsResult

src/daemon/selector-runtime.ts:410–431  ·  view source on GitHub ↗
(
  predicate: Exclude<IsPredicate, 'exists' | 'hidden'>,
  expectedText: string,
  selector: string,
  session: SessionState,
  node: SnapshotNode,
)

Source from the content-addressed store, hash-verified

408}
409
410function buildDirectIosIsResult(
411 predicate: Exclude<IsPredicate, 'exists' | 'hidden'>,
412 expectedText: string,
413 selector: string,
414 session: SessionState,
415 node: SnapshotNode,
416): Record<string, unknown> | null {
417 const result = evaluateIsPredicate({
418 predicate,
419 node,
420 nodes: [node],
421 expectedText,
422 platform: session.device.platform,
423 });
424 return {
425 predicate,
426 pass: result.pass,
427 selector,
428 ...(predicate === 'text' ? { text: result.actualText } : {}),
429 selectorChain: [selector],
430 };
431}
432
433function readDirectIosSelectorNode(data: Record<string, unknown>): SnapshotNode | undefined {
434 const nodes = data.nodes;

Callers 1

Calls 1

evaluateIsPredicateFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…