How to download PDF opening in new tab?

Could anyone please advise how to download pdf that opened in new tab?

When I click on view PDF button in parent website it will open the pdf in new tab,

1 Like

Hey! Welcome to community!

We can use attach window activity to get download that pdf or If we have the URL we can use Navigate to activity…

OR

We can Use HTTP Request to download the files

Reference:

Regards,
NaNi

Regards,
NaNi

1 Like

you can use send hotkey

in send hot key give input like ctrl+s then you can download

1 Like

Hi NaNi,

Thank you so much for your response.

The URL/Query parameters is dynamic, Unable to use navigate to, Unable to hardcode URL using HTTP Request.

Regards,
Re

1 Like

Hi Veera,

Thank you so much for your response.
I tried using keyboard shortcuts, but its not working.

Regards,
Revanth

indicate the tab and give delay before 3 seconds it will work

1 Like

Hi @rebabu ,

Use Get Attribute activity and indicate the download link/button, then retrieve href value and that will be the Dynamic URL
Then as @THIRU_NANI said, Use HTTP Request activity and pass the dynamic URL to download the file

Note: since it’s having less UI interactions, the chance of loading time errors are less

2 Likes

Hi @rebabu

Welcome to uipath community

Go to Chrome setting → Advance → Download → enable it.

After click on view pdf button Save as popup will appear.

Use type into activity and type ithe path in it.

Regards
Gokul

1 Like

In parent tab there is a view PDF button without href. when i click it (View PDF button), it opens a new tab, and I was unable to access the new tab, since the indicated element does not belongs to parent application!

I tried using Get Attribute, its not working.

1 Like

View PDF button invokes the function and returns the PDF in new tab.

I tried keyboard shortcuts, ctrl + Tab, ctrl + S. Nothing helped, when I indicate anything in new tab, getting a error like indicate element (new tab download button) does not belongs to parent element (parent webpage - https://www.fedex.com/en-in/tracking.html/)

1 Like

Hi @rebabu ,

I Checked the FedEx page, when we click the ‘View PDF’ button, it’s opening the PDF in new tab.
I’m attaching a sample workflow for downloading the PDF, have a look at that
FedEX_POD download.xaml (16.7 KB)

Try to run this and let me know

Dear Shankm,

I downloaded the xaml file but there was an error after opened the xaml file. Helps is appreciated:

Could not find member ‘CommunicationMethod’ in type ‘http://schemas.uipath.com/workflow/activities:OpenBrowser’

1 Like

Hi @kalbi

  • Are you using modern experience? if yes, try with classic
  • Make sure you are using the latest packages
    image

Thanks for the prompt reply! Got it.

However, your solution only solved the simple part of the question.

Hi @kalbi
The forum topic is about downloading the PDF which is being opened in a new browser tab. I hope the workflow is demonstrating the download operation.

If there’s more requirement or you have any issues facing with the operation, could you please explain that?

The request was “The URL/Query parameters is dynamic, Unable to use navigate”

Therefore everytime you click view pdf, a new tab will pop up.

I. E. Click view from the parent page, a child page will pop up.

How do you link between the parent and child page, and after download the pdf, how to return to the parent page to download the next pdf, say, I have ten pdf to download,

Without using hot keys.

I have solved the above issue without using hot keys but not elegant