JavascriptExecutor jse = (JavascriptExecutor)driver;
WebElement element = driver.findElement(By.xpath(".//*[@id='reviewMetadata']/a']"));
jse.executeScript("arguments [0],click();",element);
Error: Exception in thread "main" org.openqa.selenium.InvalidSelectorException: The given selector .//[@id='reviewMetadata']/a'] is either invalid or does not result in a WebElement. The following error occurred: InvalidSelectorError: Unable to locate an element with the xpath expression .//[@id='reviewMetadata']/a'] because of the following error: SyntaxError: The expression is not a legal expression.Der angegebene Selektor ist ungültig oder führt nicht in einem WebElement
Fügen Sie die entsprechenden HTML- – Guy
.//*[@id='reviewMetadata']/a – muthubala
es ist kein 'HTML' – Andersson