title: Find a total number of text boxes on a web page in Java - Selenium
body: <p>I am looking for some help as am just getting into a web automation using Selenium with the Java bindings. I am trying to find the total number of text boxes on a web page, I have the code working for checking <code>@type=text</code>. The code is below, however, when I try to find text boxes by:</p>
  
  <p><code>"//input[@type='text'[@class='dijitReset dijitInputInner']"</code> and it fails. The full code is below.</p>
  
  <pre><code>driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
  //Launch browser
  driver.get("http://localhost/2010A15/?p=register");
  
  //Create Web element list
  
  java.util.List&lt;WebElement&gt; textboxes = driver.findElements(By.xpath("dijitReset dijitInputInner']"));
  
  System.out.println(textboxes.size());
  
  for(int i=1; i&lt;=textboxes.size(); i=i+1);
  {
      System.out.println(textboxes.size());
  }
  
  driver.close();  
  
  
  
  
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Error Message: </p>
  
  <blockquote>
    <p>Exception in thread "main"
    org.openqa.selenium.InvalidSelectorException: The given selector
    dijitReset dijitInputInner'] is either invalid or does not result in a
    WebElement. The following error occurred: InvalidSelectorError: Unable
    to locate an element with the xpath expression dijitReset
    dijitInputInner'] because of the following error: SyntaxError: The
    expression is not a legal expression.</p>
  </blockquote>
  
  <p>I presume the error is telling me that <code>dijitReset dijitInputInner</code> is not valid and that's why it isn't working, however, I am unsure on how to fix this. Any help? As the class of the item in inspect element is: <code>dijitReset dijitInputInner</code>.</p>