如何将鼠标悬停在(鼠标悬停)在Ruby的硒元素? [英] How to hover over (mouseover) an element in Selenium Ruby?
本文介绍了如何将鼠标悬停在(鼠标悬停)在Ruby的硒元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道如何将一个元素悬停在硒的Ruby的webdriver?
Anyone know how to hover over an element in Selenium Ruby Webdriver?
我的code是这样的:
My code is like this:
el = driver.find_element(:css => "#foo")
driver.move_to el # How do I trigger a mouseover event on this element?
我在Linux 32位使用硒宝石的webdriver与Firefox。
I'm using selenium-webdriver gem with Firefox in Linux 32-bit.
推荐答案
原来的答复是:
driver.move_to。(EL).perform
。
我忘了 .perform
。
这篇关于如何将鼠标悬停在(鼠标悬停)在Ruby的硒元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文