Search code examples
uipathuipath-studiouipath-api

UIPath - Find OCR text position and selecting a day from the calendar


Calendar Image]

I was trying to grab a website calendar from UiPath. But when I use the Find OCR Text Position or Click OCR text activity in the UiPath Software, it will not give me the exact date that I want to select.

I want to do one thing only: I need to determine today's date, select the date, and press OK.

Calendar with Date Selected

I figured out how to calculate today's date:

Date/Time Selector

But now I only have to do, is selecting numbers, Please help me to figure this out. Thanks in advance.


Solution

  • Since we don't know much about the front-end framework you're planning to use, here's a generic approach using a relative selector. Note that I hard-coded the day (15), and I didn't check whether the correct month or year is displayed, but this should at least get you started.

    My approach uses a simple click activity with the variable day being part of the selector. There's another click activity associated with opening the picker in the first place, but as said - this is just related to the front-end framework.

    enter image description here