title: org.openqa.selenium.InvalidSelectorException
body: <p>I am trying to run a program.  Without testng it works fine.  But when I ran using TestNG  it works smoothly all the login scenarios but when it comes to logout XPath it says </p>
  
  <pre><code>FAILED: Testloginpager
  org.openqa.selenium.InvalidSelectorException: The xpath expression '//a[contains(text(),'Log out')]' cannot be evaluated or does notresult in a WebElement (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 5.19 seconds
  For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
  </code></pre>
  
  <p>But I tried the same XPath in Mozilla and found that it is the right path for that logout web element.</p>