I wrote some UI tests for Xcode that have been working for years. I tried running them again on Xcode 10.1 and iOS 12.1 and the same error is coming up in different parts of the code.
"NSInternalInconsistencyException", "-[XCAXClient_iOS interruptingUIElementsAffectingSnapshot:] called with nil input, should have been prevented by nullability and call site checks."
I need to hide the keyboard, I was using the following code, but now I'm getting an error on the tap() call. Side note: using typeText("\n") is simulating the enter key being pressed, which I need to avoid.
if XCUIApplication().buttons["Hide keyboard"].exists {
XCUIApplication().buttons["Hide keyboard"].tap()
}
I'm getting the same error trying to access certain textField.menuItems.The error also occurs on the tap() call. I was able to find a workaround for this one, but it would be nice to fix this as well.
let selectAllBtn = XCUIApplication().menuItems["Select All"]
selectAllBtn.tap()
The ideal solution would be to get the original code to work, but if that's not possible then any workaround would be great.