Skip to main content

mobium hit-test

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Ask UIKit whether a tap on the target would reach it (iOS)

The accessibility tree leaves out a view hidden from accessibility, so a tap under such an overlay lands on it while every check passes. This asks UIKit's own hit test, inside the app, which view a touch at the point tap would use goes to, and fails when it is not the target, naming what it is. Opt-in: it attaches lldb to the app, about two seconds on a simulator and nine on an iPhone, where the app must be built for development (get-task-allow), as one installed from Xcode is. iOS only.

Usage​

mobium hit-test <target> [flags]

Examples​

Ask where a tap on an element would really land​

mobium hit-test testid=submit

More, from mobium hit-test --help​

mobium hit-test testid=submit
mobium hit-test @e5

No screenshot: it asks where a tap would land, and nothing on the screen changes.

The tool​

hit-test calls app_hit_test; its arguments and what every client calls it are there.