Function

isDisplayed

Returns true if the matched node is displayed on screen.

isDisplayed

Source set: Common
public fun SemanticsNodeInteraction.isDisplayed(): Boolean

Returns true if the matched node is displayed on screen.

Specifically, the node must be composed, placed and at least a portion of its bounds must be visible on screen after clipping is applied. If no matching node is found, returns false. If multiple nodes match, throws an AssertionError.

Throws: AssertionError

If multiple nodes match this SemanticsNodeInteraction.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: