← 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:
I meant pasting the date text into the "spreadsheet" field left of the
picker? does not work?

Ok, if really not:
- the picker is contained in some fixed area of the screen relative to the position of other GUI elements
- it has a header with the 2 month-switch buttons
- a header with the weekday letters 
- and it has a fixed day-table with 7 columns and 5 rows

- the position of the day in the table can be calculated using the date functions
- the corresponding click positions can be measured/calculated once based on the GUI elements geometrics and then selected with the days table position 

day = (row, column) # row 0 ... 4, column 0 ... 7
refPoint = <center of top left day position>
clickPoint = refPoint.offset(row*day_width, column*day_height)

challenges that might be left:
- find the current position of the picker
- assure it shows the wanted month

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