How to emulate mouse hover with Capybara

前端 未结 4 1188
北荒
北荒 2020-12-13 06:27

Basically, what I\'m trying to do is click on a button that becomes visible when hovering another element (its parent).

I have tried to use trigger.(\'mouseove

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 07:08

    Using Capybara + Selenium it is possible to use "hover" with this command:

    page.driver.browser.action.move_to(page.find('YourElement').native).perform
    

提交回复
热议问题