title: Unable to locate an element using Selenium WebDriver 2.31 (JRE 7)
body: <p>I'm trying to automate a scenario which books a bus ticket in a website. I'm using Selenium WebDriver with Eclipse and when i try to locate the element, i.e. 'Passenger name', no compilation errors, but while executing it shows an error such as "<code>Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//input[@name='i_passengerAge']"}</code>".</p>
  
  <p>HTML and Java code below, also i need an hasty solution for this.</p>
  
  <p>My System Info:</p>
  
  <ul>
  <li>Windows 7</li>
  <li>Selenium WebDriver 2.31</li>
  <li>Eclipse FW</li>
  </ul>
  
  <p><strong>HTML of the WebPage:</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input name="i_passengerName" id="i_passengerName" maxlength="30" class="inputclass pageRequired commonInputStyle" title="Please enter your name!" type="text"&gt;
  
  &lt;input name="i_passengerAge" id="i_passengerAge" maxlength="2" size="4" class="inputclass fillAge digits commonInputStyle" type="text"&gt;
  </code></pre>
  
  <p><strong>My Automation Script:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>WebElement PD_Name = driver.findElement(By.name("i_passengerName"));
  PD_Name.sendKeys(new String[] {"Testing"});
  PD_Name.submit();
  
  WebElement PD_Age = driver.findElement(By.name("i_passengerAge"));
  PD_Age.sendKeys(new String[] {"45"});
  PD_Age.submit();
  </code></pre>