1

Since updating to Xcode 14.3, my UITests are failing to tap buttons on devices running iOS12!

Here is my code which works fine on other devices running iOS16 and also when using Xcode 14.2:

@discardableResult
    public func waitForButton(with identifier: String) -> XCUIElement {
        let button = app.buttons[identifier].firstMatch
        let predicate = NSPredicate(format: "exists == true")
        let expectation = expectation(for: predicate, evaluatedWith: button, handler: nil)
        let result = XCTWaiter.wait(for: [expectation], timeout: 15)
        XCTAssertEqual(result, .completed)
        return button
    }

func testStart() throws {
    test.waitForButton(with: "Welcome.button").tap() << fails here
}

Fails with Invalid parameter not satisfying: allAttributesForKey != nil (NSInternalInconsistencyException)

I am hoping it's not a case of Xcode removing support for older devices. I could use Xcode 14.2 instead if it wasn't for the fact that we are also testing iOS16.4 devices in our pipeline which we need Xcode 14.3 for.

Any help most appreciated!

skeg0
  • 95
  • 2
  • 10
  • I'm having the same problem since I updated my Xcode. In my case, this problem appears in devices running iOS 12 and 13 :( – Izabella Melo Jun 20 '23 at 17:55

0 Answers0