Placing a Date Time String in Click Activity

I am creating an automation that will need to click on a different folder each month. All the folder names are in the “NOV2023” format. A variable, CurrentMonth, was created with a Date.Today.ToString(“MMMyyyy”).ToUpper argument.

I have tried various tags and names utilizing the variable in the click activity, but the selector activity still will not recognize it.

There have been various posts about this topic, but none of the solutions worked for me.

Variable in UiPath Activity

was the default value for the variable set (then it can validate)

Can you share screenshot for this element captured in Ui Explorer?

Yes, it was ‘NOV2023’

Original Capture

Hi @cjames

Try right clicking inside the aaname attribute, and then select variable, you should check the override value checkbox in order to overwrite it.

Regards

I can right click and place the variable. However, I don’t see an option for the override value checkbox. I’ve looked all over UI Explorer.

When:
grafik

Then we set for testing purposes a default value ( a valid one)

And can standalone validate the selector

The variable works as long as the value is “NOV2023” (like you have displayed).

However, once I change the value to Date.Today.ToString(“MMMyyyy”).ToUpper, then it doesn’t work. I know that value works and will display NOV2023.

I need that string variable, since next month, I will need the bot to select the DEC2023 folder.

share with us please a screenshot from the Website, thanks

The screen
Folder Screenshots.
page is just a series of selectable folders (similar to a SharePoint site).

when NOV2023 is working perfect

We don’t see DEC2023

we conform with
grafik

Finally in such cases

  • Browser F12 WebTools, UiExplorer Analysis
  • Along with Variable Default Value
  • And Variable Value reassignments within debugging and adhoc checks using immediate panel

should help to find out what is blocking / working

Thanks for your help. DEC2023 is not there yet, but next month when I run the bot it will be. My goal is to have a click activity that will use the Date.Time.ToString variable to click on the current month’s folder.

I will take a look at the link you provided.

Are you setting the CurrentMonth variable using Default property (Date.Today.ToString(“MMMyyyy”).ToUpper) like the example “NOV2023” before or you assign it before the click activity ?

Yes, I am. I ended up trying a Click Text activity in the Open Browser. That solution has been working so far.
ClickText

1 Like