UI new window navigation + pdf download

Hello,

From a very high level, I have an unattended automation that uses UI acitivities to navigate through a website and submit a filing. Once submitted, I press a “print confirmation button”. This opens up a new page that displays the pdf.

In similar automations, I’m familiar with the “Wait for download” activity, since it normally automatically downloads. However, I’m struggling to download this PDF, especially since a new web page is opening and I don’t know how to switch my UI acitivty scope (link is always different, process runs many times too).

Any ideas on how i can reliably download this PDF and get it into my storage bucket?
Thanks for all your help.

@ryan.boersma

Does the window name contain any identifier as pdf or so..if yes you can use it

Or in classic activities there is get active window activity which can get the current window details ..that also can be leveraged

Cheers

no .pdf identifier in the url.

The URL isn’t the only available property of a window. You need to find properties that are always the same, possibly using wildcards, to generate a correct selector for Use Application/Browser. Let the new window open, and indicate it using UI Explorer and show us what you get in the panels on the right side, along with the selector it gives you.


I am new to Ui Explorer. This is what comes up from the window. Its a pdf window that I want to be saved to a temp folder/downloads and then to my storage bucket (I believe this is the best practice for unattended). Reminder it is outside of my original website Ui scope. Let me know if this is the right screenshot to be looking at. thanks

@ryan.boersma

in title work-microsoft edge should be constant ..check if that title can be used

cheers

I’m sorry where do I enter this? Somewhere in the properties of Use App/Browser?

@ryan.boersma

indicate window in use app browser and edit the selector and there use app and title only in title use * in place of the title part which is dynamic

cheers

You have designated an element within the window. You should be designating the window itself, to find a selector for that window that works in Use Application/Browser.

I have selected as large of a scope on this window app as i can. Here is a quick look at what opens up if that helps.

With Use Application/Browser you designate the window not an element inside the window.

Yes ive just selected the entire window

I see now using UI Explorer. here are the properties:

again i dont think the url is reliable because its has a random code at the end and can change based off the instance.

What part of the URL is always the same? Wildcard out the rest.

Thats what I’ve been working on. the url in the visual tree of the document is listed under ‘text’ not ‘url’. The part of the url that is the same goes up until Retrieve*

thank you again for your continued help with this problem

Using the Use Application/Browser activity, indicate the window and then show us the selector it gives you.

I believe i got it to work. Turns out by not using a use app/browser, hotkey Ctrl+S, the current Ui navigation allows me to click save on the file explorer pop up.

1 Like

If you’re opening the file explorer then you should be using Use App/Browser to attach to THAT window, not the underlying browser window.