Unable to trigger mouse event in Capybara test

后端 未结 6 1417
Happy的楠姐
Happy的楠姐 2021-02-12 13:15

I am using Capybara 1.0.0, and I have a link in my page which gets visible when mouse hover over that block. So I want to trigger mouse over in test so that I can click that hid

6条回答
  •  面向向阳花
    2021-02-12 13:28

    I've chosen to use Capybara webkit, and sadly I had to resort to executing javascript using jQuery:

    page.execute_script('$(".ClassSelector").trigger("hover")')
    

提交回复
热议问题