Skip to content
Advertisement

Selenium python click an element that appears on hover

My situation is that there is a grid of elements and on the hover of each element a button appears which you can click on then. enter image description here

See the difference between class=”grid x0 y0″ and class=”grid x1 y0″. id=”ccSelectDesignButton” only appears on hover. I want to click on first element.

The code I am using is:

JavaScript

But every time I get this error:

JavaScript

I tried many other ways to locate it as well but still, I am unable to find and click it. Can anyone give me a better idea on how to deal with this?

Advertisement

Answer

I think for mouse-over event you need to use perform() and once done you can able to select desire button element and click on that.

JavaScript

If this not resolved to your query please share the link.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement