{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

OutputKt

public final class OutputKt


Summary

Public methods

static final void
printToLog(
    @NonNull SemanticsNodeInteraction receiver,
    @NonNull String tag,
    int maxDepth
)

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

static final void
printToLog(
    @NonNull SemanticsNodeInteractionCollection receiver,
    @NonNull String tag,
    int maxDepth
)

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

static final @NonNull String
printToString(@NonNull SemanticsNodeInteraction receiver, int maxDepth)

Prints all the semantics nodes information it holds into string.

static final @NonNull String
printToString(
    @NonNull SemanticsNodeInteractionCollection receiver,
    int maxDepth
)

Prints all the semantics nodes information it holds into string.

Public methods

printToLog

public static final void printToLog(
    @NonNull SemanticsNodeInteraction receiver,
    @NonNull String tag,
    int maxDepth
)

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
@NonNull String tag

The tag to be used in the log messages.

int maxDepth

Max depth of the nodes in hierarchy to print. Zero will print just this node. Must not be negative.

printToLog

public static final void printToLog(
    @NonNull SemanticsNodeInteractionCollection receiver,
    @NonNull String tag,
    int maxDepth
)

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
@NonNull String tag

The tag to be used in the log messages. Must not be negative.

int maxDepth

Max depth of the nodes in hierarchy to print. Zero will print nodes in this collection only.

printToString

public static final @NonNull String printToString(@NonNull SemanticsNodeInteraction receiver, int maxDepth)

Prints all the semantics nodes information it holds into string.

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
int maxDepth

Max depth of the nodes in hierarchy to print. Zero will print just this node. Must not be negative.

printToString

public static final @NonNull String printToString(
    @NonNull SemanticsNodeInteractionCollection receiver,
    int maxDepth
)

Prints all the semantics nodes information it holds into string.

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
int maxDepth

Max depth of the nodes in hierarchy to print. Zero will print nodes in this collection only. Must not be negative.