View async.swift
func waitForElementToAppear(_ xcelement: XCUIElement, _ timeout: Double) { | |
let expectation = XCTKVOExpectation(keyPath: "exists", object: xcelement, expectedValue: true) | |
XCTWaiter().wait(for: [expectation], timeout: timeout) | |
} |
View gist:a940a592d4971d6f11bef4a0734530af
Given /^I have (\d+) cucumbers in my belly$/ do |cukes| | |
# Some Ruby code here | |
end |