In my iOS application, I added user interface tests where I need to check if the NavigationBar navigation button is turned on at different times.
I am currently using:
XCUIElement* saveButton = self.app.navigationBars[@"TSSIDAddCardView"].buttons[@"Save"]; XCTAssertEqual(saveButton.hittable, YES);
However, this always returns YES. The .exists test also returns YES.
Does anyone know how to do the right test?
source share