( device: DeviceInfo, x: number, y: number, button: ClickButton, context: DispatchContext | undefined, )
| 236 | } |
| 237 | |
| 238 | async function handleAlternateClick( |
| 239 | device: DeviceInfo, |
| 240 | x: number, |
| 241 | y: number, |
| 242 | button: ClickButton, |
| 243 | context: DispatchContext | undefined, |
| 244 | ): Promise<Record<string, unknown>> { |
| 245 | assertAlternateClickSupported(device, button, context); |
| 246 | if (device.platform === 'linux') { |
| 247 | return await runLinuxAlternateClick(x, y, button); |
| 248 | } |
| 249 | const { runAppleRunnerCommand } = await import('../platforms/apple/core/runner/runner-client.ts'); |
| 250 | await runAppleRunnerCommand( |
| 251 | device, |
| 252 | { |
| 253 | command: 'mouseClick', |
| 254 | x, |
| 255 | y, |
| 256 | button, |
| 257 | appBundleId: context?.appBundleId, |
| 258 | }, |
| 259 | runnerOptionsFromContext(context), |
| 260 | ); |
| 261 | return { |
| 262 | x, |
| 263 | y, |
| 264 | button, |
| 265 | ...successText(formatPressMessage({ x, y, button })), |
| 266 | }; |
| 267 | } |
| 268 | |
| 269 | function assertAlternateClickSupported( |
| 270 | device: DeviceInfo, |
no test coverage detected