sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #18082
[Question #229079]: select a date from calendar
New question #229079 on Sikuli:
https://answers.launchpad.net/sikuli/+question/229079
Hi all experts,
I have to select a date from a calendar only by clicking.
example image of calendar : http://imageshack.us/photo/my-images/833/calendarh.png/
code:
from datetime import date
from datetime import timedelta
weeks = 0
today = date.today()
monday = today - timedelta(days=today.weekday()) + timedelta(days=0, weeks=-1)
t = str(monday.day) #t=6 because monday is 2013-05-06
if reg.exists(t,0).nearby().text() == t:
click(t) #(not sure whether can click like this, but sikuli cannot run until here because it cant recognize date in the calendar)
else:
print "error!"
the result is always print "error", I am not sure is it couldn't recognize the integer on the calendar.
I am hanging here so I still couldn't proceed to select month yet.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.