2
我使用的类似结构:水豚,硒具有隐藏或显示交互:无CSS属性
<div class="edit" style="visibility: hidden;">
<a href="some_path" id="edit_item">Edit</a>
</div>
然后我将鼠标悬停鼠标这个元素变得可见,但我有困难的相互作用与测试此操作(使用黄瓜,水豚,硒)。
我得到一个错误
Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
我试图用Element.trigger(event)与鼠标悬停,但它不能在硒... 我怎么能与此元素进行交互工作?
请注意,'with_scope'对'execute_script'没有影响。 –