Tag Info

Hot answers tagged


According to WebDriver API JavaDoc, if no matching elements are found then the NoSuchElementException is thrown by findElement() method, not NullPointerException. So the root cause of your problem is not a wrong XPath expression. Instead, your stacktrace and your source code suggests this is a problem with driver variable not initialized: you try to call ...

Only top voted, non community-wiki answers of a minimum length are eligible