printToLog

Function
Common
fun SemanticsNodeInteraction.printToLog(
    tag: String,
    /*@IntRange(from = 0)*/
    maxDepth: Int = Int.MAX_VALUE,
)

Prints all the semantics nodes information into logs (as debug level).

By default this also prints all the sub-hierarchy. This can be changed by setting a custom max depth in maxDepth.

Note that this will fetch the latest snapshot of nodes it sees in the hierarchy for the IDs it collected before. So the output can change over time if the tree changes.

Parameters

tag The tag to be used in the log messages.
maxDepth Max depth of the nodes in hierarchy to print. Zero will print just this node. Must not be negative.
Common
fun SemanticsNodeInteractionCollection.printToLog(
    tag: String,
    /*@IntRange(from = 0)*/
    maxDepth: Int = 0,
)

Prints all the semantics nodes information into logs (as debug level).

By default this does not print nodes sub-hierarchies. This can be changed by setting a custom max depth in maxDepth.

Note that this will fetch the latest snapshot of nodes it sees in the hierarchy for the IDs it collected before. So the output can change over time if the tree changes.

Parameters

tag The tag to be used in the log messages. Must not be negative.
maxDepth Max depth of the nodes in hierarchy to print. Zero will print nodes in this collection only.