sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22644
Re: [Question #240489]: trying to automate selecting date on a calendar on a webpage
Question #240489 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/240489
Status: Open => Answered
Eugene S proposed the following answer:
What I would do in your situation is write a small auxiliary function
that will get the number of times the "UP" button should be pressed as a
parameter. Then you can just call that function with a single line.
It might look something like that:
def buttonPress(button,count):
"""Press any provided button for "count" times.
"""
for num in range(1, count+1):
type(button)
Then you can call it like that:
buttonPress(Key.UP, timesToPress)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.