cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bobybonillamx
Frequent Visitor

Multiple pdf download qith mutiple steps

Hi,

I have an issue with a flow in desktop

 

I need to download like 19,000 pdf's from a web page, but the web page has 3 steps to get the pdf download button

 

i've tryed with web page data extrator and recording the steps but the fisrt button in the page get a blank text input at beginning but when i press it get a text with the specific name of the file (not a overall button text)

 

Si i tryed  to make an apply to each in the flow but it doesn't detect the rest of the buttons because they have an specific title linked to the pdf name 

 

This is how the web page presents the buttons, the 3 dot button it's the firs one to click

1st.jpg

and so on it doesn't have pagination it's just a scroll list limited by 500 files each time i ask for them

 

that first button the UI detector of PA doesn't get the title, so it don't make the table un the web extractor

 

bobybonillamx_0-1677702446877.png

 

When you click in that 3 dot button displays the options and ther i need to click in the print one

bobybonillamx_1-1677702517310.png

When i click in print manifest i get another option in a pop up mode

bobybonillamx_2-1677702579146.png

and there i need to click in the coversheet button to get the pdf file

 

This i need to repeat the action with each of the files but i can't make the flow work by it self to move on with the next in the list

 

any advise?

 

Thanks

 

 

 

 

14 REPLIES 14
Pavel_NaNoi
Impactful Individual
Impactful Individual

This is just an assumption but the website three dots are probably identified by an id such as div:eq(n) or button:eq(n) where n is any value from 0 - the number of three dot drop down buttons.

 

So, in this case what'll work is:

  • Extract data from webpage all three dot dropdown buttons
  • Start loop (not a for each, just a normal loop) that goes from 0 to the number of rows extracted from page
  • Click link on webpage, with a custom selector, go into text editor and put in the selector from Extract data from webpage action, but with a variable inside whatever CSS element is responsible for selecting the three dot dropdown, so the aforementioned div:eq(n) or button:eq(n) above, might even be something else completely, just play around with it.
  • Click link on webpage but now press the print button
  • Wait for website content / Wait for window content (depends on the popup, but just wait for that element)
  • Click link on webpage / Click UI Element (again depends on the popup) onto the print manifest coversheet button
  • End of loop

That should do it I think.

momlo
Super User
Super User

Hi @bobybonillamx 

I will not answer directly to your questions but ask if the below approach would be possible in your case.

 

1. Can you obtain the list of those 15k documents in a form of a list/excel etc?

2. Does the "print manifest" button has a URL that you can capture? Is this URL unique per file?

3. If the URL from point 2 is unique per document, do you have all the details used to build the URL included on your list form point 1?

 

And now, if answers to all points are "yes", what you could try to do is:

 

1. Get the list of documents

2. For each document build URL and open it, then click the button, do whatever you need to do afterwards, end loop iteration

Hi, sorry for the delay

 

the 1st point "

  • Extract data from webpage all three dot dropdown buttons"

i assume it's like a title because i don't understand if it's a instruccion how to do it,

 

i have been looking in the CSS to play arround with the id of the button but the 3 ID that i see o nothing, i asume it's because the espacial text that embed in the button when i click on it

 

i'm trying to replicate an understand all that you write me but i think i'm missing details from it 

 

i will tell you if i achive something new thanks!

Hi!

1. NO it just shows as is in the image is a scroll down list 

2. YES i'ts unique but it only "exist" when i click in the 3 dots before that is not present 

 

ok, i understand the link is not shown until you click the dots, but can you test if you do something like:

 

1. Open the list of documents

2. Click the dotts, right click the button with link and copy the link

3. Go back to the list of documents, so it is like you never did (2). Then paste the copied URL into browser and see where it takes you

Sorry, to be more specific,

use the "Extract data from webpage" action, then go to your webpage a little console should popup when you do, right click on the three dots dropdown on the webpage to extract its contents, and extract text for example, then go onto a different dropdown, do the same, this should then extract all dropdowns on the webpage and you'll see outlines around them, once that is done, go into the "advanced options" in the console, and copy the CSS selector you see, copy both the base and the target selectors, and put them together as such:

Pavel_NaNoi_0-1678188408790.png

then use that as the custom selector I mention in the next step,

 

Let me know if anything else doesn't make sense.

Hi,

 

i now understand but it doesn not make that, i have used that console before but for some reason that 3 dots doesn't seem to work with that, look

 

When the estract dat afrom web console is open it looks like this:

 

bobybonillamx_0-1678205446056.png

 

bobybonillamx_1-1678205464917.png

 

it doesn't "read" the name so the list it's in blank and is where i can't move on

 

but i now see what you are talking about the selectors i got this in the advanced options

 

bobybonillamx_2-1678205816600.png

 

So i will use like this if i'm undertanding well:

 

html > body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div:eq(1) > cdk-virtual-scroll-viewport > div:eq(0) > cbptm-view-cards > mat-card > mat-card-header > div > mat-card-title > div > div:eq(6) > button:eq(1)

 

Let me try with that 

Ok so i've try this but i keep getting errors

bobybonillamx_3-1678207521358.png

 

 

it seems like the popup changes every time it opens for some reason the flow works now with the 3 point and the print manifest button but the coversheet i can't make it click

 

i try the web extract thing you said in the advanced options but it shows as single value

bobybonillamx_4-1678207551205.png

 

Its supposed to be a single value for that button in particular, if it "changes" each time you need to make it more generic, try making the single value selector from html > body > .... to just button:contains(Print Manifest Coversheet).

 

Also your code will open up 300 microsoft edge instances,

please put that outside the loop, and also make the 300 loop index the datafromwebpage.rowscount instead.

ok so, fter this week

i finally don't get errors in the button pushes

but the loop is now working and only download the 1st document over and over again

 

bobybonillamx_0-1678841584047.png

i noticed that the 2nd button the "print manifest" in the drop down menu has this

bobybonillamx_1-1678841627369.png

and that cdk-overlay changes to 7 or 20 or 61 without any rational list or arrange in the next button is like this

 

div[Id="cdk-overlay-61"] > div > div > button:eq(1)

 

The 3 dots button has this example

 

in th first button is:

> body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div > cdk-virtual-scroll-viewport > div > cbptm-view-cards > mat-card > mat-card-header > div > mat-card-title > div > div > button > span > i:eq(1)

 

but in the second button is:

> body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div > cdk-virtual-scroll-viewport > div > cbptm-view-cards > mat-card > mat-card-header > div > mat-card-title > div > div > button > span > i:eq(3)

 

in the third button is:

> body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div > cdk-virtual-scroll-viewport > div > cbptm-view-cards > mat-card > mat-card-header > div > mat-card-title > div > div > button > span > i:eq(5)

 

i suppose the 3 dot buton has a +2 modification but i don't kno how to mark that in the loop

 

The last button that is the coversheet seems to work well with the Span class but i can't verify further 

To mark that in the loop, just do this:

- Create a new variable outside the loop, name it ButtonIndex or something and set it to 1

- In your selector now change it to the following:

> body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div > cdk-virtual-scroll-viewport > div > cbptm-view-cards > mat-card > mat-card-header > div > mat-card-title > div > div > button > span > i:eq(%ButtonIndex%)

- Finally, put an "Increase variable" action at the end of the loop and tell it to increase the ButtonIndex variable by 2.

 

That should work.

 

Wow i-m getting close to it now

 

I have got the flow to push all the 3 dot button that are visible in the screen and also download the PDF succesfully

 

But now when it whet to the bottom of the list (without scrolling down) it stops to work and send an error that doesn't find the next button

 

i suppose it's because the button is not visitble in the page

 

i've tryed to scroll down with java and focus on text with out success

 

the div look like this:

> body > cbptm-root > cbp-root > div > cbptm-manifest-list > div > div > cdk-virtual-scroll-viewport > div

bobybonillamx
Frequent Visitor

ok so new issue jaja

 

the 3 dot button that increase value +2 in the list is defined by the position in the window

 

so if the 9th button in the list is at the top of the list (because the scroll) it has de ID 3 again en the 10th 5 and go on

 

so when i scroll down the id moves with the scroll

 

i'm getting frustrated

That's one annoying webpage, christ who writes evil HTML code like that? alright try the following:

In your loop do an if statement that checks when it hit the last ID on the screen via a number e.g in the case above that you've provided: If ButtonIndex >= 20 (because the ID of the 8'th button would be 20) then: Set variable ButtonIndex = 1 and then scroll down.

This will reset it (I'm assuming you've found a way to scroll down reliably) and start the next loop looking at the first ID.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (998)