maestro
maestro copied to clipboard
Selector properties don't function properly inside the "runFlow" method
Selector properties don't function properly inside the "runFlow" method. it will always get 'enabled: true' and execute the command even if 'enabled' is actually 'false'
it does work in assert like this: - assertNotVisible: text: "My Button" enabled: true
but NOT like this:
- runFlow:
when:
visible:
id: "appId:id/switch_wid"
index: 0
**enabled: true**
commands:
- tapOn: "read receipts."
- back
This prevents me from performing a commends depending on the state of the switch. because it's always got through no matter the actual state.
To Reproduce
- connect real android device via USB.
- Run 'maestro test' file with that flow:
- runFlow: when: visible: id: "appId:id/switch_wid" # it's just an example. index: 0 enabled: true commands: - tapOn: "read receipts." # it's just an example. - back
- The Flow will always pass and the commands will always perform even if the Switch status is enabled: false
Expected behavior When: Switch 'id' and 'index' is 'visible' in 'enabled' status as 'true' - perform the actions in the 'commands' section.
Screenshots
Environment information (please complete the following information):
- Maestro version [v1.36.0]
- Platform: [Android 13.0]
- Framework: [Native Android]
- Device model and OS version: [Pixel 6 pro, LineageOS 13]
- physical device
- Host [Mac Intel Core i5, macOS Monterey 12.7.4]
Given you've provided the flow, is the app also something publically available? I fancied trying to investigate this, but didn't want to try writing an app that exposed the enabled flag just to get started.