← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #169927]: how to operate a date picker with click()

 

Question #169927 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169927

RaiMan proposed the following answer:
In your case, it seems, that you only have to calculate the new date
(using Python's date functions), convert it to the correct string and
paste it into the field.

from datetime import date
from datetime import timedelta
print "start"
now = date.today() 
print now
future = now + timedelta(20)
print future
print future.strftime("%d/%m/%Y")
past = now + timedelta(-10)
print past
print past.strftime("%d/%m/%Y")

more info: http://docs.python.org/2/library/datetime.html#module-
datetime

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.