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

tagThe tag to be used in the log messages.
maxDepthMax 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

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