How to handle Scroll bars while developing test scripts in Sikuli for automation

user5189426 picture user5189426 · Aug 4, 2015 · Viewed 8.2k times · Source

I am automating a page which is designed in Flex, so i am writing scripts in Sikuli. Now i want to move the scroll bar up and down. Can anybody help me?

Answer

Tenzin picture Tenzin · Aug 7, 2015

At the moment there is not a function to move the scrollbar.
But you can use dragDrop() to move it.

For example:

ImageScrollbar = ("bar.png") # Make for example a image of those 3 stripes on the scrollbar.
# Locate the scrollbar 
regionScrollbar = find(ImageScrollbar)
# Move the scrollbar vertically down 
dragDrop(regionScrollbar, Location(regionScrollbar.getX(), regionScrollbar.getY() + 100))