How to use the robot choose the month before the current month on the webpage

Hi, expert.
I have a question about how to let robot choose the drop-down menu.
I want to choose the one month before the current month on the drop-down menu.
And it on the WEB page.
It can be come true?
How can I make it?
Welcome to teach me more.

Hi @HuaiYe

Try this expression

Use Type into activity or Select Item Activity

DateTime.Now.AddMonth(-1).Tostring("dd-MM-yyyy")

Regards
Gokul

1 Like

@HuaiYe

Use Select Item activity and indicate that drop-down field to select the item from the list.

Can you please share how month names will appear in drop down list.

To get the previous month, we need to use below expression.

              Now.AddMonth(-1).ToString("MMMM")
1 Like

Hi @Gokul001 ,
I try your way, and it success.
Thanks!
Grateful,
HuaiYe

Great @HuaiYe

Happy Automation

Regards
Gokul

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.