title: how to use List<WebElement> webdriver
body: <p>I am creating an automatic test for some webs and I'm using WebDriver, TestNG and code that is written in Java. On the page is shown register of categories, in parentheses is number of auctions and i need to get this number as variable.</p>
  
  <p>I use this code</p>
  
  <pre><code>By bycss =By.cssSelector(".list.list-categories&gt;li:first-child");
  WebElement number1_1_vse = driver.findElement(bycss );
  String text_vse1_1 = number1_1_vse.getText();
  </code></pre>
  
  <p>but I get only first number and i need to get all. Someone advised me that I should use List. But when i use it, i get only </p>
  
  <pre><code>[[[[[[[FirefoxDriver: firefox on WINDOWS (7e6e0d0f-5cbb-4e48-992f-26d743a321a5)] -&gt; css selector: .list.list-categories&gt;li:first-child]] -&gt; xpath: ..]] -&gt; xpath: .//*], [[[[[[FirefoxDriver: firefox on WINDOWS (7e6e0d0f-5cbb-4e48-992f-.....
  </code></pre>
  
  <p>code: </p>
  
  <pre><code>By bycss2 =By.cssSelector(".list.list-categories&gt;li:first-child");
  WebElement number1_1_vse2 = driver.findElement(bycss2 );
  WebElement parent1 = number1_1_vse2.findElement(By.xpath(".."));
  List&lt;WebElement&gt; childs1 = parent1.findElements(By.xpath(".//*"));
  System.out.println(childs1);
  </code></pre>
  
  <p><a href="http://www.labmultis.info/jpecka.portal-exdrazby/index.php?c1=2&amp;a=s&amp;aa=&amp;ta=1" rel="nofollow">link to the website</a></p>
  
  <p><a href="http://postimg.org/image/49t1rj2pp/" rel="nofollow">screenshot -> image with the number</a></p>
  
  <p>can anyone advise me please?</p>