title: Unable to locate an element even when the xpath is correct
body: <p><img src="https://i.stack.imgur.com/Bu4eq.jpg" alt="enter image description here"></p>
  
  <p>i'm tried to select an element from an auto suggestion field but i got always an error saying that the element could not be found even that i'm sure my xpath is correct</p>
  
  <p>here's my code : </p>
  
  <pre><code>wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class=\"ui-menu-item-with-icon ui-menu-item\"][1]")));
  
  driver.findElement(By.xpath("//*[@class=\"ui-menu-item-with-icon ui-menu-item\"][1]")).click();
  </code></pre>
  
  <p>it should find //*<a href="https://i.stack.imgur.com/Bu4eq.jpg" rel="nofollow noreferrer">@class=\"ui-menu-item-with-icon ui-menu-item\"</a> which is the first suggestion albert cammus</p>
  
  <p>here's the outerHtml</p>
  
  <pre><code>&lt;li class="ui-menu-item-with-icon ui-menu-item" role="menuitem"&gt;
    &lt;a class="ui-corner-all" tabindex="-1"&gt;
      &lt;span class="item-icon"&gt;&lt;/span&gt;
      Albert Camus (SARCELLES)&lt;/a&gt;
  &lt;/li&gt;"
  </code></pre>