Test Bridge
The test bridge is exposed as window.__sootsimTest in the browser. All test drivers (Detox, Maestro, Playwright) use this API to query the Peach node tree.
Worker-backed reads are asynchronous. Always await bridge results, including find, query, layout, and tree methods:
The signatures below show the resolved values. Depending on the runtime surface, a method can return that value directly or a promise of it.
Find methods
Query
Inspect
Debug
Runtime introspection and profiling
Beyond querying the tree, __sootsimTest is a full runtime debugger: the same
surface the CLI’s debug and describe commands drive. The categories:
- +Animation tracing:
listAnimations,getAnimation,enableAnimationTrace/disableAnimationTrace,getAnimationTrace. Answer “did this animation actually run, or snap?” frame by frame. - +Perf / diagnostics:
getCullStats,getImageLoaderStats,getIncrementalYogaVerifier(checks the layout dirty-tracking against a full recompute),getWorkletSlotStats,workerDebugState. - +Network interception:
getRequests,getFailedRequests,getRequestCounts,clearRequests. - +Input / text introspection:
getFocusedNode,getFocusKeyboardSnapshot,getTextInputDisplayText,getTextSelection,getLoupeState,getEditMenuState. - +Inspect tooling:
inspectAt,inspectHoverAt,inspectSetStyleOverride. - +Scroll / navigation state:
getScrollState,getScrollSnapshots,getNavigationSnapshot,isNavigationIdle. - +Direct dispatch:
activatePressByText/activatePressById,openDeepLink,scrollTo.
Most debugging is easier through the CLI (peach debug,
peach describe) than by calling these directly, since
the CLI wraps this bridge with settling and formatting.