public final class ScreenData


Stores metadata for a visited screen in an Espresso test.

Summary

Public constructors

Public methods

final void

Adds an ActionData with this as source and a given ScreenData as the destination.

final void

Creates and appends an artifact to this ScreenData object.

final void

Creates and appends a ViewData to this object.

final int
final @NonNull List<@NonNull ActionData>

Gets the list of ActionData objects corresponding to actions taken from this screen.

final @NonNull List<@NonNull TestArtifact>

Gets the list of TestArtifact objects on this screen.

final @NonNull List<@NonNull ViewData>

Gets the list of ViewData objects on this screen.

final void
setActionIndex(int actionIndex)

Public constructors

ScreenData

public ScreenData()

Public methods

addAction

public final void addAction(@NonNull ActionData action)

Adds an ActionData with this as source and a given ScreenData as the destination.

addArtifact

public final void addArtifact(@NonNull TestArtifact artifact)

Creates and appends an artifact to this ScreenData object.

addViewData

public final void addViewData(@NonNull ViewData viewData)

Creates and appends a ViewData to this object.

getActionIndex

public final int getActionIndex()

getActions

public final @NonNull List<@NonNull ActionDatagetActions()

Gets the list of ActionData objects corresponding to actions taken from this screen.

getArtifacts

public final @NonNull List<@NonNull TestArtifactgetArtifacts()

Gets the list of TestArtifact objects on this screen.

getViews

public final @NonNull List<@NonNull ViewDatagetViews()

Gets the list of ViewData objects on this screen.

setActionIndex

public final void setActionIndex(int actionIndex)