Skip to content

Instantly share code, notes, and snippets.

@objectmethod
Created July 7, 2017 17:06
Show Gist options
  • Save objectmethod/be20e35114de5a924ad4b2f56feac04d to your computer and use it in GitHub Desktop.
Save objectmethod/be20e35114de5a924ad4b2f56feac04d to your computer and use it in GitHub Desktop.
[RKTApplication doCrucialAction:^{
NSString *searchFieldIdentifier;
if ([[UIDevice currentDevice] SQ_isPhone]) {
searchFieldIdentifier = @"Search";
} else {
searchFieldIdentifier = @"Search All Items";
}
[tester turnOffAutocompleteForSearchField:searchFieldIdentifier];
[RKTApplication doCrucialAction:^{
if ([[UIDevice currentDevice] SQ_isPhone]) {
[tester clearTextFromAndThenEnterText:text intoViewWithAccessibilityIdentifier:@"Search"];
} else {
[tester clearTextFromAndThenEnterText:text intoViewWithAccessibilityIdentifier:@"Search All Items"];
}
}];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment