I've been writing UITests, and after recording a test to open a modal view, and swipe the modal down to the bottom of the screen to dismiss it, I get some code like this (as there is a table view in there):
var tablesQuery = app.tables.element(boundBy: 0)
tablesQuery.swipeDown()
The problem is, this doesn't always work. Sometimes (especially on iPad), the view moves down a bit and jumps back into place (rather than dismissing) when playing the test back.
Apple must have had the same issue and put in a better solution to dismiss modal views (.present) on iOS 13 XCUITests.
Is there a way to reliably dismiss these suckers that is supported by the core test framework so I don't have to do any custom fiddling with gestures or whatnot?
Thanks for any help!
If there aren't any obvious solutions, I guess a hacked heavy duty down gesture might answer this question as well... As all answers out there are for very tiny or slight versions of the swipes, not full screen dismissal gestures. But I'd like your context on a supported solution first (do you know a supported solution doesn't exist - for example?)
Thanks for any help! - supported/maintained by Apple way of dismissing views via XCTest framework, or info about this not existing will answer this question.