Skip to content

Instantly share code, notes, and snippets.

@Jaym3s
Created February 1, 2012 22:30
Show Gist options
  • Save Jaym3s/1719885 to your computer and use it in GitHub Desktop.
Save Jaym3s/1719885 to your computer and use it in GitHub Desktop.
Navigating UITableViews with UIAutomation
- (void)awakeFromNib
{
[self.tableView setaccessibilityLabel:@"first_table"];
[super awakeFromNib];
}
function cellWithIndexFromTableNamed(celldex, tableName) {
return window.tableViews().firstWithName(tableName).cells()[celldex];
}
cellWithIndexFromTableNamed(0, "first_table").tap();
function cellNamedFromTableNamed(cellName, tableName) {
return window.tableViews().firstWithName(tableName).cells().firstWithName(cellName);
}
function cellNamedFromTableNamed(cellName, tableName) {
return window.tableViews()[tableName].cells()[cellName];
}
var first_table = window.tableViews()[0];
var first_cell = first_table.cells()[0];
first_cell.tap();
var second_table = window.tableViews()[1];
var second_table_cell = second_table.cells()[0];
second_table_cell.tap();
var first_table = window.tableViews().firstWithName("first_table");
var first_cell = first_table.cells()[0];
first_cell.tap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment