[QA] hover and scroll

Željko Filipin zfilipin at wikimedia.org
Wed Oct 16 14:51:13 UTC 2013


On Fri, Sep 27, 2013 at 6:37 PM, Amir E. Aharoni <
amir.aharoni at mail.huji.ac.il> wrote:

> There is a .hover method in WebDriver (or is it PageObject? I'm never sure)


page-object gem just adds API on top of selenium-webdriver and
watir-webdriver gems. Hover[1] method is part of watir-webdriver gem. I
could not find it in selenium-webdriver.

but it seems that it only works if the element is in the viewport.


You can use selenium-webdriver's #location_once_scrolled_into_view
method[1], but watir-scroll gem[2] also looks interesting. (Warning: I did
not use watir-scroll gem, but it is created by one of watir-webdriver gem
developers, so it is probably good.)

Željko
--
0: http://rdoc.info/gems/watir-webdriver/Watir/Element#hover-instance_method
1:
http://selenium.googlecode.com/svn/trunk/docs/api/rb/Selenium/WebDriver/Element.html#location_once_scrolled_into_view-instance_method
2: https://github.com/p0deje/watir-scroll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20131016/71fad192/attachment.html>


More information about the QA mailing list