how to select n-1 date from a calender in ui path
Can we type the date directly into the application instead of selecting it from Calendar ?
Isn’t the core question here how to select any date from a calendar?
And to go for the n-1 option… that is just a date calculation.
Assign: myDate = now() Assign: myMinusOneDate = myDate.addDays(-1)
As for the calendar click… that depends a bit on the type of calendar / what type of object this would be. Nonetheless it often involves clicking a set of separate year / month / day selectors.
Derive these values from your date by using
myDate.Day / myDate.Month myDate.Year and build your dynamic selectors using these values.
If I’m completely missing the point, please elaborate on your question
He’s talking about a calendar on the screen where you have to select a date.
Give us a URL, screenshots, something to go off of.
I understand, the same principles apply though…
This can be tricky. as people have said previously the easy part is getting to the date you want - tomorrow would be date.today.adddays(1) for instance.
The tricky bit tends to be automating the calendar clicks. There are two ways which I have used in the past - either actually just typing the date instead of clicking through the calendar (this is simplest and tends to work in most circumstances) or looking at the attribute for the date field and then changing the attribute itself using uipath activities, this can also work well in some circumstances.
If neither of these work then it gets more complex around reading the year and day from the calendar, then adjusting them as appropriate to your needs by clicking though to the right year/month. then clicking on the correct day.