Created
February 13, 2014 09:22
-
-
Save jollychang/8972186 to your computer and use it in GitHub Desktop.
uiautomation login demo
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
var target = UIATarget.localTarget(); | |
var app = target.frontMostApp(); | |
var appWindow = app.mainWindow(); | |
var user = 'youruser'; | |
var password = 'yourpass' | |
appWindow.logElementTree(); | |
UIALogger.logMessage(appWindow.textFields()); | |
appWindow.textFields()[0].setValue(user); | |
appWindow.secureTextFields()[0].setValue(password); | |
var loginButton = appWindow.buttons()[0]; | |
loginButton.tap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment