Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

SemanticsSelector

class SemanticsSelector
kotlin.Any
   ↳ androidx.ui.test.SemanticsSelector

Projects the given set of nodes to a new set of nodes.

Summary

Public constructors
<init>(description: String, requiresExactlyOneNode: Boolean, chainedInputSelector: SemanticsSelector? = null, selector: (Iterable<SemanticsNode>) -> SelectionResult)

Projects the given set of nodes to a new set of nodes.

Public methods
SelectionResult
map(nodes: Iterable<SemanticsNode>, errorOnFail: String)

Maps the given list of nodes to a new list of nodes.

Properties
String

Description that is displayed to the developer in error outputs.

Public constructors

<init>

SemanticsSelector(
    description: String,
    requiresExactlyOneNode: Boolean,
    chainedInputSelector: SemanticsSelector? = null,
    selector: (Iterable<SemanticsNode>) -> SelectionResult)

Projects the given set of nodes to a new set of nodes.

Parameters
description: String Description that is displayed to the developer in error outputs.
requiresExactlyOneNode: Boolean Whether this selector should expect to receive exactly 1 node.
chainedInputSelector: SemanticsSelector? = null Optional selector to apply before this selector gets applied.
selector: (Iterable<SemanticsNode>) -> SelectionResult The lambda that implements the projection.

Public methods

map

fun map(
    nodes: Iterable<SemanticsNode>,
    errorOnFail: String
): SelectionResult

Maps the given list of nodes to a new list of nodes.

Exceptions
AssertionError if required prerequisites to perform the selection were not satisfied.

Properties

description

val description: String

Description that is displayed to the developer in error outputs.