public void click()
{
List<WebElement> list = driver.findElement(By.xpath("//a[contains(text(),'javascript:toggleEnabled']@href + /a//img[@title='Inactive']"));
list.click
}
I am not able to click on title = "Inactive" in javascript console. The HTML code is mentioned below.
<a href="javascript:toggleEnabled('Collaboration: Browse -> Buy');">
<img src="/console/themes/images/new_imgs/status_light_off.png" style="width:24px; height:24px;" alt="Inactive" title="Inactive">
</a>