fun SemanticsNodeInteraction.assertIsNotEnabled(): SemanticsNodeInteraction = assert(isNotEnabled())
but my
SemanticsConfiguration
doesn't seems to contain the
SemanticsProperties.Disabled
key.
Any thoughts in how to include this key to my
SemanticsConfiguration
?
f
FunkyMuse
04/05/2022, 6:56 PM
Copy code
var isButtonEnabled by remember { mutableStateOf(false) }
Button(
enabled = isButtonEnabled,
){
}
You can test the variable this way
Or access the semantics through the InspectorInfo > properties > properties[“enabled”]
k
Kivia Brito
04/05/2022, 7:38 PM
I figured out that I wasn't getting the button itself, that is why my
SemanticsProperties.Disabled
wasn't there, I was getting the wrong node when looking for the button by its text. Now I am trying to figure out how to get a node from its Role. Any idea?
Kivia Brito
04/05/2022, 8:50 PM
I used contentDescription instead. Thanks for the help!
r
ritesh
04/05/2022, 9:55 PM
Now I am trying to figure out how to get a node from its Role. Any idea?