Created
May 17, 2012 13:57
-
-
Save jacksonh/2719096 to your computer and use it in GitHub Desktop.
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 window = UIATarget.localTarget().frontMostApp().mainWindow (); | |
var table = window.tableViews () [0]; | |
var results_cell = table.cells () [0] | |
var run_cell = table.cells () [1]; | |
var passed = false; | |
var results = ''; | |
run_cell.tap (); | |
while (true) { | |
target.delay (5); | |
try { | |
results = results_cell.name (); | |
} catch (e) { | |
UILogger.logDebug ('exception'); | |
continue; | |
} | |
if (results.indexOf ('failure') != -1) { | |
passed = false; | |
break; | |
} | |
if (results.indexOf ('Success!') != -1) { | |
passed = true; | |
break; | |
} | |
} | |
UIALogger.logDebug ('Results of test run: ' + results); | |
UIALogger.logDebug ('Passed: ' + passed); | |
// | |
// This line is for integration into our test running harness | |
// | |
// sendHostMessage ('testResults', { passed: passed, results: results }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment