Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
uiautomation login demo
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