( params: SelectorRuntimeDeviceParams, text: string, )
| 172 | } |
| 173 | |
| 174 | async function findTextWithAppleRunner( |
| 175 | params: SelectorRuntimeDeviceParams, |
| 176 | text: string, |
| 177 | ): Promise<boolean | null> { |
| 178 | const target = readAppleRunnerFindTextTarget(params); |
| 179 | if (!target) return null; |
| 180 | const result = (await runAppleRunnerCommand( |
| 181 | target.device, |
| 182 | { command: 'findText', text, appBundleId: target.appBundleId }, |
| 183 | buildAppleRunnerFindTextOptions(params, target), |
| 184 | )) as { found?: boolean }; |
| 185 | return result?.found === true; |
| 186 | } |
| 187 | |
| 188 | function readAppleRunnerFindTextTarget( |
| 189 | params: SelectorRuntimeDeviceParams, |
no test coverage detected