Hi,
With the given code snippet of the scroll bar, how can i move the scroll bar in the following order/direction using robot framework - selenium?
<div id="horizontalscrollx" style="overflow-x: scroll; overflow-y: hidden; width: 100%; height: 18px;">
<div style="width: 3100px;"/>
![](https://lh6.googleusercontent.com/-bpwJIvstvR8/U6lJ_9i9aFI/AAAAAAAAAG8/thSNnDsYMwY/s1600/scrollbar+problem.jpg)
1) I want to move scroll bar from the order of A, B, C,D, and to E . Any idea on how I can move it? I tried using :
Execute Javascript window.document.getElementById('horizontalscrollx').scrollLeft = window.document.getElementById(horizontalscrollx").scrollWidth/2;
And as a result, I was able to move the scroll bar to position "C". However, I was not able to move the scroll bar from "C" to "D" and from "D" to "E". I tried using the keyword:
Execute Javascript window.document.getElementById('horizontalscrollx').scrollLeft = window.document.getElementById(horizontalscrollx").scrollWidth/-2;
Execute Javascript window.document.getElementById('horizontalscrollx').scrollLeft = window.document.getElementById(horizontalscrollx").scrollWidth/-24;
Execute Javascript window.document.getElementById('horizontalscrollx').scrollLeft = window.document.getElementById(horizontalscrollx").scrollWidth/-32;
Execute Javascript window.document.getElementById('horizontalscrollx').scrollLeft = window.document.getElementById(horizontalscrollx").scrollWidth/-64;
Please help me.
Thank you!
Regards,
Paolo