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

Function prefersValueForReadableText

src/utils/text-surface.ts:93–103  ·  view source on GitHub ↗
(type: string)

Source from the content-addressed store, hash-verified

91 * (e.g. iOS XCUITest) re-read at the element can recover fuller text than the snapshot node.
92 */
93export function prefersValueForReadableText(type: string): boolean {
94 const normalized = normalizeType(type);
95 return (
96 normalized.includes('textfield') ||
97 normalized.includes('securetextfield') ||
98 normalized.includes('searchfield') ||
99 normalized.includes('edittext') ||
100 normalized.includes('textview') ||
101 normalized.includes('textarea')
102 );
103}
104
105function isMeaningfulReadableIdentifier(value: string): boolean {
106 if (!value) {

Callers 2

readTextForNodeFunction · 0.90
extractReadableTextFunction · 0.85

Calls 1

normalizeTypeFunction · 0.85

Tested by

no test coverage detected