resolveNode

suspend fun resolveNode(selector: Selector, requireVisible: Boolean = true): NodeSnapshot

Resolves and returns a NodeSnapshot for the element matching the provided selector.

This retrieves a point-in-time snapshot of the node's properties (such as bounds, tag, text, and visibility).

Return

the resolved NodeSnapshot.

Parameters

selector

the query matching the target element.

requireVisible

if true, the resolution will only succeed if the matching node is currently visible.

Throws

if the selector cannot be resolved to a unique node.


suspend fun resolveNode(selector: String, requireVisible: Boolean = true): NodeSnapshot

Resolves and returns a NodeSnapshot for the element matching the provided selector string.

This is a convenience shortcut for resolveNode using String.asAutoSelector.

Return

the resolved NodeSnapshot.

Parameters

selector

the query matching the target element.

requireVisible

if true, the resolution will only succeed if the matching node is currently visible.