How to select the date dynamically

Hi all,

BOT needs to login to a portal and download some reports from the portal at the time of downloading BOT needs to click on the date dynamically (I meant that I need to download the report on daily basis).
Today I did it for 8 october 2021, I want do the same for everyday i.e 9 october 2021,november,december and so on please suggest me that how to resolve the same.
Thanks.

hi @HeartCatcher

Can you share the selector in which you have been selected today’s date ?

Regards
Sudharsan


Please find


aaname = 6 is the date i guess?
in your selector

Selectors.txt (118 Bytes)

Yes correct

So, you can try there

aaname = date.now.tostring("d")

Regards
Sudharsan

if I try this what if the month and the year goes change

Hi,

I think It might be easier to input date string to text fields using TypeInto activity directly if it works, than click date on calendar. Can you try it?

Regards,

You have written the activities to change year and month right?


getting error

Can you Run your code once and check once?

@Yoichi
It is working fine for the current month but not for next or previous month.

I am not written can you guide me please.

@HeartCatcher

Can you try with Set Text activity and the date value should be matched as per “08/10/2021” format

You can try as Now.ToString(“MM/dd/yyyy”)

Hope this may help you

Thanks

Dear Naveen,
Use TypeInto activity and set the date.
strDate =Now.ToString(“dd/MM/yyyy”)
Presentday =Now
If you want future or past dates ,Use AddMonths/days and so on (explore datetime functions)

Thanks and Regards,
Geetishree Rao

If possible can you start
Share the website link?