How to handle scrollbars when developing test scripts in Sikuli for automation

I am automating a page that is developed in Flex, so I write scripts in Sikuli. Now I want to move the scrollbar up and down. Can anyone help me?

+3


source to share


2 answers


There is currently no scroll bar move function.
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))

      

+2


source


With Sikuli it's pretty easy to scroll, I've already done that.

Use the wheel function



wheel(WHEEL_DOWN, 4)  # Scrolls down 4 times 
wheel(WHEEL_UP,   12) # Scrolls up   12 times

      

+2


source







All Articles