title: Appium: An element could not be located using Xpath in android hybrid apps?
body: <p>I trying to automate a hybrid app using the appium.i had developed my app using Ionic Framework. i had completed the total setup ready.then i tried to find the elements inspecting using firebug in Mozilla.i found the xpath of a particular button is   <code>//Button[text()='BROWSE MENU']</code>.</p>
  
  <p>but when i try to test it using appium it is unable to find it , my test got failed.</p>
  
  <h2>i tried some thing like this in my test</h2>
  
  <pre><code>driver.findElement(By.xpath("//button[text()='BROWSE MENU']")).click();
  </code></pre>
  
  <h2>this is the error i am getting on the console</h2>
  
  <pre><code>FAILED: Loginforsample
  org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 5.13 seconds
  For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
  </code></pre>
  
  <p>this is inspector<a href="https://i.stack.imgur.com/NYfKX.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/NYfKX.jpg" alt="enter image description here"></a></p>
  
  <p>i didn't know where exactly i am going wrong. initially i tried WEB_VIEW to inspect in chrome then i noticed that ionic has an advantage of direct inspecting using <em>ionic serve</em>. so i simply shifted to that and again i got struct here. please help me guys to this issue for me.</p>
  
  <p>thanks in advance.  </p>