Cannot dismiss date pickers in iOS 11.3.1 in UI automated tests

Hi Guys, i am currently having problems dismissing date pickers on iOS 11.3.1 on the iPad in UI automated tests.


static func dismiss() {
        let app = XCUIApplication()
        let popoverDismissRegionElement = app.otherElements["PopoverDismissRegion"]
        if popoverDismissRegionElement.exists && popoverDismissRegionElement.isHittable {
            popoverDismissRegionElement.tap()
        } else {
            let window = app.windows.element(boundBy: 0)
            window.tap()
        }
    }


I was able to dismis them in UI test’s prior to upgrading to iOS 11.3.1.

Powered by WPeMatico

About

You may also like...

Comments are closed.