Skip to content

Instantly share code, notes, and snippets.

@AyaAkl25
Created August 28, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AyaAkl25/4e9f23f04b0f477edf5661710b0aeabe to your computer and use it in GitHub Desktop.
Save AyaAkl25/4e9f23f04b0f477edf5661710b0aeabe to your computer and use it in GitHub Desktop.
async wait xcuitest
func waitForElementToAppear(_ xcelement: XCUIElement, _ timeout: Double) {
let expectation = XCTKVOExpectation(keyPath: "exists", object: xcelement, expectedValue: true)
XCTWaiter().wait(for: [expectation], timeout: timeout)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment