title: How to locate a list element (Selenium)?
body: <p>I have the following list:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt; item1 is red
  &lt;/li&gt;
  &lt;li&gt; item1 is blue 
  &lt;/li&gt;
  &lt;li&gt; item1 is white  
  &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I tried the following to print the first item:</p>
  
  <pre><code>String item = driver.findElement(By.xpath("//ul//li[0]")).getText();
          System.out.println(item);
  </code></pre>
  
  <p>However, I got: NoSuchElementException...
  I could use a cssSelector but I do not have the id for the ul<br>
          </p>