title: Can we find element by ID in appium
body: <p>following link mentions that we can find element by giving id... but i am unable to find it.</p>
  
  <p><a href="https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/finding-elements.md" rel="noreferrer">https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/finding-elements.md</a></p>
  
  <p>find by "name" (i.e., the text, label, or developer-generated ID a.k.a 'accessibilityIdentifier' of an element)</p>
  
  <p>i tried following code:</p>
  
  <pre><code>WebElement el = driver.findElement(By.name("txtLogin"));
  </code></pre>
  
  <p>where txtLogin is id for login button</p>
  
  <p>it gives following exception:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>can please anyone explain what are all the ways there to find elements in appium</p>