title: org.openqa.selenium.InvalidElementStateException: invalid element state: SyntaxError
body: <p>Here is my code</p>
  
  <pre><code>driver.findElements(By.cssSelector(".main-menu a:contains(\"Access Menu\")")).size()
  </code></pre>
  
  <p>is throwing exception</p>
  
  <pre><code>org.openqa.selenium.InvalidElementStateException: invalid element state: SyntaxError: DOM Exception 12
  </code></pre>
  
  <p>Same css value is working in jquery i.e. <code>$(".main-menu a:contains(\"Access Menu\")").size()</code></p>