[WebDriver] throw exception if XPath is malformed