Show Menu

UI Testing with Swift Cheat Sheet (DRAFT) by

How do I test this with UI Testing?

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Testing if an element exists


Waiting for an element to appear

let goLabel = app.staticTexts["Go!"]

app.buttons["Ready, set..."].tap()
XCTAssert(goLabel.waitForExistence(timeout: 5))
"­Wai­tin­g" is now built into XCTest.