[richfaces-issues] [JBoss JIRA] (RF-13063) RichFacesInputNumberSlider setValueByDragging

Jiří Štefek (JIRA) jira-events at lists.jboss.org
Tue Jul 9 02:48:21 EDT 2013


     [ https://issues.jboss.org/browse/RF-13063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiří Štefek updated RF-13063:
-----------------------------

    Comment: was deleted

(was: Thanks for the interest [~blabno].

Will this cover your requirements? https://github.com/richfaces/richfaces-qa/blob/slider/page-fragments/src/main/java/org/richfaces/tests/page/fragments/impl/input/inputNumberSlider/RichFacesSliderComponent.java#L122

)

    
> RichFacesInputNumberSlider setValueByDragging
> ---------------------------------------------
>
>                 Key: RF-13063
>                 URL: https://issues.jboss.org/browse/RF-13063
>             Project: RichFaces
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: qe
>    Affects Versions: 4.3.2
>            Reporter: Bernard Labno
>            Assignee: Jiří Štefek
>            Priority: Minor
>
> In richfaces-qa/page-fragments there is RichFacesInputNumberSlider fragment. It would be great to be able to test setting value as percentage of width implemented as dragging the handle.
> One can do it like that:
> {code}
> ((JavascriptExecutor) GrapheneContext.getProxy()).executeScript("arguments[0].scrollIntoView(true);", weightSlider.getNumberSlider().getRoot());
>         waitGui();
>         final int width = weightSlider.getNumberSlider().getWidth();
>         final int where = (int) (width * percentage);
>         final WebElement handle = weightSlider.getNumberSlider().getHandleElement();
>         final Action action = new Actions(GrapheneContext.getProxy()).clickAndHold(handle)
>             .moveToElement(weightSlider.getNumberSlider().getRoot(), where, 0)
>             .release(handle)
>             .build();
> {code}
> It is very important to bring component into view before dragging.
> If you do not do that and component is very far to the right (you need to scroll to the right to see it) then calculations are wrong.

--
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 richfaces-issues mailing list