Select PDF Report from Browser

Hi!

I have a monthly report that is generated on my work intranet that I need to be able to pull data from. I’ve only just started learning StudioX and this is my first project. I am unsure how to click and make it choose the latest report and not one of the older reports or the same report each month I run the automation.

Example: The page currently has 3 reports: GenericReport_202301, GenericReport_202302, GenericReport_202303.

This month I want the 202303 report for March but next month I’ll need 202304 for April.

Appreciate any guidance!

Hi @chwalker474, welcome to the Community.

To make the report name dynamic, you can build a name string before clicking the report like this:

“GenericReport_”+Now.ToString("yyyyMM")

By this way, you will make the year &o month part of the selector dynamic. If you run the process in 2025 June, the above data will be automatically incorporated as GenericReport_202506.

You can save this data in a variable & pass the variable to the selector.

Hope this helps,
Best Regards.

1 Like

Hi,

Basically it’s necessary to use DynamicSelector
Can you try the following step?

First, create yyyyMM style date string using ModifyDate activity.
Then, put UseApplicationBrowser and Click. Indicate browser and target element.
Next, Check strict selector and uncheck fuzzy and image at Targeting method of Click activity.
Edit strict selector property using Selector Editor. Highlight part you want to change dynamically, then right click - use variable - choose date string variable which you created in the above.

The following is a sample of click dynamically for date (it’s MMMM yyyy style)

NewBlankTask20230419-1.zip (53.4 KB)

Dynamic selector
https://docs.uipath.com/studio/standalone/2022.10/user-guide/dynamic-selectors

Hope this helps you.

Regards,

I’d recommend finding a way to filter your results to put the newest at the top. Otherwise, if the naming convention is always the same, perhaps there is an option to search for the most current file.

In both methods, StudioX would simply always click on the first/only result.

Hope this helps, cheers!

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