maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Enable further property assertion (checked/selected) on elements such as switches/chips/selectors

Open simon-gilmurray opened this issue 2 years ago • 1 comments

Currently the following properties are being exposed for true/false on elements:

"clickable" : "true",
"enabled" : "true",
"focused" : "false",
"checked" : "true",
"selected" : "false"

For elements such as switches/chips/selectors there is currently no way to know if they are checked/selected as we're only able to query the enabled state which seems to evaluate as true for nearly everything on screen.

I realise these are currently only queryable in Android and not iOS, but I think it would make for much cleaner code and assertions if we could evaluate on them as an optional field. At the moment I have to write my tests with existing knowledge of the current switch state and sometimes toggle not knowing which way it is going to be set.

simon-gilmurray avatar Oct 24 '22 16:10 simon-gilmurray

Main use case from this is to be able to run conditional flows as a result of the outcome of the element state

simon-gilmurray avatar Oct 25 '22 08:10 simon-gilmurray

As mentioned by @simon-gilmurray, it's useful for validating the mentioned parameters

Hema-ACS avatar Feb 10 '23 10:02 Hema-ACS

Closed in #781

axelniklasson avatar May 03 '23 13:05 axelniklasson

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Jul 11 '24 14:07 github-actions[bot]