Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Pick a date from a calendar?
#1
The are fields in some Web based programs that requires you to pick a date from pop up calendar.
You need to pick a year first then a month then a day. After clicking a day, the date value will appear in the field.
I tried to record a macro that clicking the year box to select a year, also a month box to select a month, based on Excel sheet. But for the day there is no box, all the possible days for the selected month there on the calendar.

[Image: popupCalendar.jpg]

I think that my way is not very effective.
Any ideas to improve my way, or may be another way out of the box?
#2
I solved picking a full date using a long way. The solution is as follows:
  • 1. Select a year based on Excel sheet cell value. I created a macro to click the year box by position x & y. Then send keys of the year.
    2. Select a month based on excel sheet cell. I created a function to check the month number and send keys accordingly. The mouse will activate the month box before, using position x& y.
    3. Select a day. I created a function to check on the day number, then it search for a picture of that day. I already took a pic for every day of the month 31 small pic :mrgreen: .

It is long solution. But it works.
Appreciate and ideas.
#3
I would try accessible object functions. At least selecting days would be easier. But can be difficult to capture accessible objects if the popup is auto-closed eg when loses focus.


Forum Jump:


Users browsing this thread: 1 Guest(s)