title: UIAutomation with Instruments - How to tap copy/paste buttons?
body: <p>I'm using Instruments for iOS automation and I can't seem to figure out how to tap options on the copy/paste menu.  When I do a logElementTree(),I see that we are returning a UIEditingMenu and then three elements (which correspond to options of that menu, such as copy/paste, etc..). I am attempting to place this into a variable, and then trying to "tap" that variable but I cannot get that to work.  Here is a sample of my code:</p>
  
  <pre><code>var target = UIATarget.localTarget();
  
  var app = target.frontMostApp();
  
  var window = app.mainWindow();
  
  //This generates the highlighted text
  
  app.dragInsideWithOptions({startOffset:{x:0.45, y:0.6}, endOffset:{x:0.45, y:0.6}, duration:1.5});
  
  var copy = app.editingMenu.elements.withName("copyButton");
  
  copy.tap();
  
  Instruments returns, "0) UIAElementNil".  In addition to the above, I've also tried:
  
  app.elements.withName("copyButton")
  
  window.elements.withName("copyButton")
  </code></pre>
  
  <p>So, I can get the editingMenu to produce the available options, but I cannot figure out a way to tap or select one of those options.  I'm not quite sure I know how to reference those options to begin with.</p>
  
  <p>Does anyone have any ideas?</p>
  
  <p>Thanks!</p>