Skip to content

Instantly share code, notes, and snippets.

@yas375
Created January 26, 2012 10:34
Show Gist options
  • Save yas375/1682162 to your computer and use it in GitHub Desktop.
Save yas375/1682162 to your computer and use it in GitHub Desktop.
example of using UIAutomation with tuneup_js
test("Initial screen", function(target, app) {
// check navigation bar
navBar = mainWindow.navigationBar();
assertEquals("Add Account", navBar.name());
button = navBar.leftButton();
assertEquals("Back", button.name());
// check tables
table = mainWindow.tableViews()[0];
tableGroup = table.groups()[0];
assertEquals("What type of account?", tableGroup.name());
assertEquals(4, table.cells().length);
["facebook", "flickr", "github", "twitter"].each(function(i,e) {
assertNotNull(table.cells().firstWithName(e));
});
// more to come...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment