That is the HTML piece of the element which i need to click, I am getting "org.openqa.selenium.InvalidSelectorException"
<svg viewBox="0 12.705 512 486.59" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg" height="20" width="20" style="margin-right:
0px;">
<svg viewBox="0 12.705 512 486.59"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg" height="20" width="20" style="margin-
right: 0px;">
<defs>
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566
354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295
159.102,313.435 1,198.566 196.426,198.566 " style="fill:
url(#jRate_grad4);stroke:black;fill-opacity:1;stroke-width:2px;">
</svg>
I used below code:
>WebElement ele = driver.findElement(By.xpath(".//*[@id='jRate']/svg[5]/"));
>JavascriptExecutor js = (JavascriptExecutor)driver;
>js.executeScript("argument[0].click()", ele);
I tried to find the element and just click on it, because of exception, I used JavaScript and issue is same. I don't know what I am missing here.
Java related help is much appreciated.
/from thexpath.