sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22642
[Question #240489]: trying to automate selecting date on a calendar on a webpage
New question #240489 on Sikuli:
https://answers.launchpad.net/sikuli/+question/240489
I'm currently parsing a date with originally looks like this:
End Date: 12/04/14(mm/dd/yy)
then i parse it so i have the values
endday = time.strftime('%d', rawdate)
endmth = time.strftime('%m', rawdate)
endyr = time.strftime('%Y', raw date)
The calendar looks like this:
http://postimg.org/image/dz1y81ijh/
Then first selecting the months I'm doing something like this at least for the months:
i use key.home to go to the top then use a if statement
if endmth.startswith("01"):
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
elif endmth.startswith("02"):
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
type(Key.UP)
elif endmth.startswith("03"):
So far that works for months and I assume it would work for years but the years menu goes from 1980 to 2020
So I imagine it will be too cumbersome for an if statement
I'm wondering if there's something I can do that's more elegant?
And as for selecting a date on the calendar I have no clue how I'm going to accomplish it because the only way is to click the day
Any help or suggestions or better yet examples is appreciated :-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.