Choose the month in a checkbox according to the current date

I need to automate the import of a report, so I need to download a file for the current month.
To filter the month I want, I need to select a checkbox, as shown in the image below.
Capturar

My question is: how to make the selection dynamically? this automation will run every 20th day of the month.

Hi, first thing i ask, did you succeed in selecting a checkbox without it being dynamic? Like Abr one for example? If yes, then to make it dynamic you can try like this:
varText = Date.Now.ToString("MMM")

Hi @bcorrea
I can select the checkbox or the text ‘Abr’, in other words, I cannot select the checkbox by clicking on the text. But I can extract the text.
I understand that I can use this function to know the right month for selection, but how will I make the robot choose the right box among the 13 existing ones?

best regards

That i could not tell without access to the application or a working selector… What is the selector you have for the Abr checkbox?

I use ‘Click’

try making a selector that dont make use of the idx attribute as it is not reliable, but if cant, than if Abr= 6, does it make sense to say that Dez will have idx=14?

Actually ‘Abr’ is 5, ‘Mai’ was selected.

How do I replace idx?

Create a String variable with the name= varMonthId
Assign varMonthId = (Date.Now.Month+1).ToString
In that selector you showed me, replace the idx='6' part with idx='{{varMonthId}}'

1 Like

Thank you @bcorrea

1 Like

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