I need to click on the element that has the following code
<img src="images/myImage.png" style="cursor:pointer;" onclick="ToggleAdvanceSection();ShowModal();" alt="">
this element is visible on the screen. it is an image. once clicked, a modal widow shows up
I tried
driver.findElement(By.xpath("//*[@onclick='ToggleAdvanceSection();ShowModal();']")).click();
However it throws an error : not visible . I made sure that the page is loaded . . still the same thing
How to click this element ?
inspect elementin chrome shows this elementelement is not visible