Detox 18.x can’t seem to match, view & interact with swiftUI elements.
- I have tested this issue on the latest Detox release and it still reproduces
I found this closed issue in detox issues regarding swiftUI & forked this sample repo from there & added jest support for better logs, I also added an action to the button in that repo to show an alert & added a tap acton in detox tests.
Basically with version 17.14.9 detox can see the button & click it too (but after that it seems to be waiting on some event to sync up, have included test run logs below with debug-sync) & thus never runs the next step & fails
With version 18.0.0 & 18.3.1 , detox doesn’t seem to even see the button & is also unable to tap it (I even tried disableSync & no luck sadly).
Adding steps to reproduce below
npm run detox:ios:build
npm run detox:ios:test(added various debug flags for convenience)
Please let me know if you need any more info 🙏🏼, also great work with detox!
Detox should be able to match, view SwiftUI elements & interact with them
I have attached videos of the full test runs below for detox-17.14.9 & detox-18.3.1 (notice on 17.14.9 it sees the button & taps it as the alert pops up , but with version 18.3.1 it can’t even see the button)
Environment (please complete the following information):
- Detox: 18.3.1
- Node: v10.14.1
- Device: iPhone 11 Pro
- Xcode: Version 12.4 (12D4e)
- iOS: 14.4
- macOS: 11.2 (Big Sur)
If you are experiencing a timeout in your test
- I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much, I have read synchronization debug documentation and am providing the relevant synchronization debug output below:
Device and verbose Detox logs
- I have run my tests using the
--loglevel traceargument and am providing the verbose log below:
Please see the logs of test run with various detox versions below