maestro
maestro copied to clipboard
Enable further property assertion (checked/selected) on elements such as switches/chips/selectors
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.
Main use case from this is to be able to run conditional flows as a result of the outcome of the element state
As mentioned by @simon-gilmurray, it's useful for validating the mentioned parameters
Closed in #781
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!