Created
August 28, 2018 16:34
-
-
Save AyaAkl25/4e9f23f04b0f477edf5661710b0aeabe to your computer and use it in GitHub Desktop.
async wait xcuitest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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