title: Tap command on a button not working in UIAutomation
body: <p>I have this button in an app. I want to simulate a tap on the button. The button is located as follows: target>frontMostApp()>windows()[0]>buttons()[2]. My javascript code is as follows:
  <code>target.frontMostApp().windows()[0].buttons()[2].tap();</code>
  But after running the code, the following error message is shown:</p>
  
  <blockquote>
    <p>Error: target.frontMostApp().windows()[0].buttons()[2] could not be tapped</p>
  </blockquote>
  
  <p>I have checked that the accessibility label of this button is set to enabled. Can anyone tell me what I am doing wrong? Below is a screenshot from the instruments console:</p>
  
  <p><img src="https://i.stack.imgur.com/6gBiG.png" alt="enter image description here"></p>
  
  <p>The highlighted button is the button I would like to tap.</p>