in S3TransferUtility-Sample/Swift/S3TransferUtilitySampleSwiftUITests/S3TransferUtilitySampleSwiftUITests.swift [38:58]
func testButtons() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
let app = XCUIApplication()
let tabBarsQuery = app.tabBars
let uploadButton = tabBarsQuery.buttons["Upload"]
uploadButton.tap()
app.buttons["Select Image and Upload"].tap()
let cancelButton = app.navigationBars["Photos"].buttons["Cancel"]
let exists = NSPredicate(format: "exists == 1")
expectation(for: exists, evaluatedWith: cancelButton, handler: nil)
waitForExpectations(timeout: 5, handler: nil)
cancelButton.tap()
let readyStaticText = app.staticTexts["Ready"]
readyStaticText.tap()
tabBarsQuery.buttons["Download"].tap()
readyStaticText.tap()
uploadButton.tap()
}