I have a Element Xpath
//img[@onclick="EditResource(this,'10','0');"]
I need to use this in a loop where i will replace 10 with a variable i.
driver.findElement(By.xpath("//img[@onclick='EditResource(this,'" + i +"','0');']"))
But it is giving an error No such Element as EditResource is in the double quotes.