Quantcast
Viewing latest article 27
Browse Latest Browse All 39

Answer by kubi for UITests in Xcode 7 finds wrong 'Next' button

The specific solution to this problem is to look for elements that are descendants of the main window.

func testNextButtonDisabled() {  let app = XCUIApplication()  XCTAssertFalse(app.childrenMatchingType(.Window).elementBoundByIndex(0).buttons["Next"].enabled)}

For a general solution to solve problems like this: In Xcode run the "Record UI Test" again to see how Xcode thinks you should be referencing the element in which you're interested.


Viewing latest article 27
Browse Latest Browse All 39

Trending Articles