hitTest
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Ask the platform's own hit test, below accessibility, whether a touch at the point app_tap would use reaches the target — and if not, what it would reach. These call app_hit_test.
hitTest
public Map<String, Object> hitTest(String target)
Asks UIKit's own hit test, below accessibility, whether a tap on the target would reach it. Throws when the touch would go elsewhere, naming what would take it and whether accessibility can see it. iOS only, and opt-in: it attaches lldb to the app, about two seconds on a simulator and nine on an iPhone, where the app must be a development build.
@param target a ref from map, or a locator @return the point a tap would use, and that it reaches the target
Examples
Ask where a tap on an element would really land
Map<String, Object> hit = device.hitTest("testid=submit");
System.out.println(hit.get("reaches"));