Created
March 8, 2016 14:55
-
-
Save leopic/5d648251a02a70e43374 to your computer and use it in GitHub Desktop.
Example of how to type into a textfield
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 testExample() { | |
let app = XCUIApplication() | |
// Tap on the button on the screen | |
app.buttons.elementBoundByIndex(0).tap() | |
// Find the alert | |
let alert = app.alerts.elementBoundByIndex(0) | |
// Find the textfield | |
let textField = alert.textFields.elementBoundByIndex(0) | |
textField.tap() | |
textField.typeText("Hola Don!") | |
XCTAssertTrue(true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment