title: Selenium WebDriver Find nth element
body: <p>I am kinda stuck in a problem and am not able to fix it I have to access nth image on my page which comes in table inside HTML. I need to click on image to move to next screen respectively for each row</p>
  
  <p>I have tried various solution provided here but since I am working with findElement(by) syntax I am not able to run my code with those assistances</p>
  
  <p>My code is:</p>
  
  <pre><code>public void editUser(String userName)
  {
      System.out.println("in editUser 1");
      int row = getCellRow(table, userName);
      System.out.println("in editUser 2");
  
      WebElement  edit = driver.findElement(By.xpath("//*[@class='grid']/tbody/tr[2]/td[8]/a[1]/img"));
  
      System.out.println("in editUser 3");
      edit.click();
      System.out.println("in editUser 4");
      clickButton(closeButton);
  }
  </code></pre>
  
  <p>Error is : </p>
  
  <pre><code>No such element exception. Unable to locate element: {"method":"xpath", selector"://img[@title='User Management'])[2]
  </code></pre>
  
  <p>Selenium IDE could recognize my element but not selenium web driver !
  Please advice</p>