[arquillian-issues] [JBoss JIRA] (ARQGRA-417) Support for automatic scrolling to element before its usage

Juraj Húska (JIRA) issues at jboss.org
Tue Jan 14 09:05:32 EST 2014


Juraj Húska created ARQGRA-417:
----------------------------------

             Summary: Support for automatic scrolling to element before its usage
                 Key: ARQGRA-417
                 URL: https://issues.jboss.org/browse/ARQGRA-417
             Project: Arquillian Graphene
          Issue Type: Feature Request
          Components: core
    Affects Versions: 2.0.1.Final
            Reporter: Juraj Húska
            Priority: Minor


It would be nice if Graphene supports automatic scrolling of browser window to {{WebElement}} / Page Fragment before its is used.

It can be useful for interactions with various popups web components: contextMenu, tooltip, ...
Those components can not be interacted correctly when they are not in the viewport, and thus one needs to scroll to them manually in his test.

It is often problem in CI environment, where tests run on screens with lower resolution (smaller part of the page fit the browser window, and lot of elements are not in the viewport).

My naive implementation of this would look like:
* intercept all calls to {{WebElements}} and PageFragments root elements
* in the interceptor method get the location of the element by: {{Point location = element.getLocation();}}
* a then scroll to it: {{jsExecutor.executeScript("window.scrollTo("" + location.getX() +", " + location.getY() + ")");}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the arquillian-issues mailing list