Created
November 5, 2012 00:28
-
-
Save sgoodwin/4014543 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 window = app.mainWindow(); | |
var testName = "Dummy Test"; | |
function dummyTest(){ | |
UIALogger.logStart(testName); | |
var button = window.buttons()["Go"]; | |
if(!button.isValid()){ | |
UIALogger.logFail("The Go Button was invalid!"); | |
return; | |
} | |
button.tap(); | |
var label = window.staticTexts()["Poopsicles!"]; | |
label.isValid(); // This makes it wait until animation transition completes and the label appears before checking values. | |
window.logElementTree(); | |
var title = label.label(); | |
if(title == "Poopsicles!"){ | |
UIALogger.logPass(testName); | |
}else{ | |
UIALogger.logFail("The label's title was " + title); | |
} | |
} | |
dummyTest(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment