Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. iOS automation : how to tap button that has no id
  2. UIAButton: rect:{{20, 427}, {41, 41}}
  3.  
  4. UIAButton: rect:{{140, 427}, {41, 41}}
  5.        
  6. - (id)init
  7. {
  8.   _view = [[[MyCustomView alloc] initWithFrame:CGRectZero] autorelease];
  9.   [_view setIsAccessibilityElement:YES];
  10.  
  11.   [_view setAccessibilityTraits:UIAccessibilityTraitButton];
  12.   [_view setAccessibilityLabel:NSLocalizedString(@"view.label", nil)];
  13.   [_view setAccessibilityHint:NSLocalizedString(@"view.hint", nil)];
  14. }
  15.        
  16. var window = UIATarget.localTarget();
  17. window.tap({x:yourXCoordinateHere , y:yourYCoordinateHere});