sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22908
Re: [Question #234428]: how do i swipe right or left on an android emulator using Sikuli IDE
Question #234428 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/234428
HAL-9000 posted a new comment:
I use variations of this function all the time to find specific objects
in a list.
def ScrollDown(target, anchor, stop):
while not region.exists(target):
region.dragDrop(anchor.below(some-number-of-pixels), anchor)
if region.exists(stop):
break
target = what you want to find in the list.
anchor = something permanent on the region (you have to find() the target before executing this loop).
stop = something to break the loop if its not finding the target. Usually, this will be some proprietary image at the bottom of the list.
If you want to swipe left etc. you just specify that in the dragDrop in
lieu of 'below.'
One thing though I have not figured out personally is how to do a true
heuristic 'flick.' This is where, like say on a mobile smartphone, you
'flick' the screen and it keeps scrolling several seconds after you
stopped touching the screen.
The touch layer on Windoze 8 Metro and all the smartphones only pick up
that heuristic if the mouse is accelerating through the dragDrop, and I
do not know how to do that in Python.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.