web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Download Multiple File...
Power Automate
Unanswered

Download Multiple Files from a Web Application

(0) ShareShare
ReportReport
Posted on by 58

Hi All,

 

I am new to Power Automate Desktop. I want to download files from a web application and save it.

 

Can i use XPath expressions for that?

If the web app's UI change at any point of time(considering the element still be there), i dont want to fail my flow as the element position got changed in the page.

 

Any advice on this requirement.

 

Thanks in Advance

Santo

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The element selectors in PAD are based on CSS. If you want to use XPath, you can do that via the Run JavaScript function on web page action, if you can write a JS script.

     

    If you capture a proper selector, the position of the element may not really matter very much. But it really depends on each specific UI. See this tutorial to learn more about editing selectors: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors 

    Also this video: https://www.youtube.com/watch?v=2PcyBa22Jj8&ab_channel=Thomas%22Shaky%22Petersen

  • santoGD Profile Picture
    58 on at

    Thanks @Agnius  for the detailed info.

    Is it custom selector or writing javascript is better and stable?

     

    I have seen that with custom selectors, the element is able to find out even though the position is different.

     

    So anything else other than custom selectors , do i need to take care when selecting an element or writing some text in web application?

     

    Thanks in Advance

    Santo

  • cwischnewski Profile Picture
    142 on at

    I think you will be fine sticking to standard selectors.  Start with trying to capture them using the GUI tools in PAD.  Then look at the selector they identified and you will find the CSS Selector is very similar to XPath.

     

    We started our RPA journey on another tool that used XPath, I found it pretty easy to transition to CSS selectors.  This cheat sheet (https://devhints.io/xpath) I found helps with showing common things in both XPath and CSS Selector to help make that transition.  Another helpful thing that doesn't seem to be mentioned is that the PAD selectors are actually hybrid of CSS and JQuery selectors (https://api.jquery.com/category/selectors/) here is another helpful guide on some JQuery selector concepts that you can use to get some missing XPath functionality.  I think you will find almost everything you have done in XPath can be done with a combination of the CSS Selectors and the JQuery selector functions.

     

    I have been known to create one UI element and just replace the string with a variable and then use a Set variable to assign my own selector string on the step before I need to use it.

  • santoGD Profile Picture
    58 on at

    Hi @cwischnewski 

     

    Thanks very much for the assistance.

     

     

    When I read through documents, XPATH can be added only for XML document processing.

    I have the scenario of downloading documents from web application with some input parameters (Iterate through some path and then input search parameter )for search.

     

    In this scenario, how I need to proceed?

    1)Is it with UI elements with custom selectors and data extraction from web ?

    2)javascript/jquery(which I don t know where to write)

     

    OR any other approach?

     

    Thanks in advance

    Santo

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It really depends on your own preferences. If you are proficient in JS, feel free to use that. But the standard UI element functionalities should generally work for you. I usually revert to JS when standard UI elements do not work properly, but cases like that are actually quite rare, and apply to some specific web pages.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard