Skip to content

Instantly share code, notes, and snippets.

@ingshtrom
Created September 5, 2014 12:54
Show Gist options
  • Save ingshtrom/ce86448263738ab8f5ea to your computer and use it in GitHub Desktop.
Save ingshtrom/ce86448263738ab8f5ea to your computer and use it in GitHub Desktop.
// import mechanic and tuneup.js here
test("foobar", function(target, app) {
$.delay(3);
var username = $("#login-username");
username.log();
if (username instanceof UIAElement) {
$.message("username is a UIAElement.");
} else {
$.message("username is NOT an UIAElement.");
}
username.typeString("foobar");
assertTrue("foobar", username.value(), "foobar wasn't typed into the username text field.");
});
// output
// 2014-09-05 12:50:08 +0000 logElementTree:
// UIATextField "login-username" {{169, 412}, {325, 40}}
//
// 2014-09-05 12:50:08 +0000 Default: username is NOT an UIAElement.
// 2014-09-05 12:50:08 +0000 Error: TypeError: 'undefined' is not a function (evaluating 'username.typeString("foobar")')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment