TestNodeSelection

class TestNodeSelection(testContext: TestContext, selector: TestNodeSelector)

Lazy representation of a single test node with necessary logic to materialize on-demand.

Note: materalizing the TestNodeSelection should result in exactly 1 test node unless the assertDoesNotExist method is used. In any case, an IllegalStateException will be thrown if more than 1 test nodes are realized.

Constructors

Link copied to clipboard
constructor(testContext: TestContext, selector: TestNodeSelector)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun fetchTestNode(errorOnFail: String = "Failed"): TestNode
Link copied to clipboard

Dispatches a click event for the node represented in the given selection.

Link copied to clipboard
fun TestNodeSelection.printTo(appendable: Appendable, maxDepth: Int = Int.MAX_VALUE)

Prints all the available node information into the given appendable.

Link copied to clipboard
fun TestNodeSelection.printToString(maxDepth: Int = Int.MAX_VALUE): String

Prints all the available node information into a string.

Link copied to clipboard

Returns a TestNodeSelection that further filters the current one, by selecting the child TestNode at index.

Link copied to clipboard

Returns a TestNodeCollectionSelection that further defines the current one, by defining a collection of TestNode composed by its children.