开发者

Fire event mouseenter/mouseleave on Capybara/Selenium on Firefox

开发者 https://www.devze.com 2023-04-12 12:29 出处:网络
So here\'s my code for trigger the event page.execute_script(\"$(\'.image_grid\').trigger(\'mouseenter\');\")

So here's my code for trigger the event

    page.execute_script("$('.image_grid').trigger('mouseenter');")

During the test the event is not fired, this event set visibility to true of a div. So my div's visibility is set to false and Selenium doesn't want to do something on non-visible elements.

If execute this code in Firefox Javascript's console during the test everything is ok.

I have seen that some people solve this issue in Java by using directly the driver with session.driver but i haven't figured 开发者_如何学JAVAout how to put the mouse on my element.

Thanks for your help :)

0

精彩评论

暂无评论...
验证码 换一张
取 消