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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Loop Top10 candidates ...
Power Automate
Answered

Loop Top10 candidates in JobStreet and download resume

(0) ShareShare
ReportReport
Posted on by

Hi,

May need help with Power Automate Desktop.

 

1) I want to get Top10 of the candidates only,

2) How can I make the PAD to loop and download the resume for the top 10 candidate

 

For now, when I use a loop, it will only download the first candidate's resume only. 

 

nraindmia_0-1700019795489.png

For Line 27 supposedly it will go to the next candidates after the first candidate's resume is downloaded, but the flow will stuck there after downloading the first candidate's resume.

To get top 10 candidates, usually in one page we have a list of 20 candidates, so I minus by 10. but there may be another way to do it. 

 

This is the list of candidates in JobStreet, PAD need to select the candidate first, then the details of the candidate will appear with the download button.

nraindmia_1-1700020396356.png

nraindmia_2-1700020581110.png

 

Thanks!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Your Add item to list action is set up incorrectly. %DataFromWebPage.RowsCount% simply stores a single value - an integer that indicates how many rows you have in %DataFromWebPage%. So, using %DataFromWebPage.RowsCount-10% will also result in a single value - an integer that is equal to the rows count minus 10.

     

    Instead, what you should do, is use a different loop. Use a Loop action and loop from 0 to 9 (because indexes are 0-based), incrementing by 1. And then get each item as %DataFromWebPage[LoopIndex]%. You might also want to check if %DataFromWebPage.RowsCount% < %LoopIndex% and use Exit loop if it is, so that your flow does not crash in cases when you have less than 10 candidates in total.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    Hi @Agnius ,

     

    I understand and already changed to loop instead of for each and followed the steps given. But do you know how can I use a loop to select the next candidates using recording? for now, when the first candidate's resume is downloaded and saved, it will not select the next candidates and download the resume. it appears this error.

    nraindmia_1-1700033645429.png

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You probably need to modify your selectors for the elements you're trying to click. You may need to add a variable to the selector. Please check this article on how to do that: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors

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

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    Hi @Agnius ,

    Thanks for the reference given but I tried to do it but it did not solve my problems. Do you have any other articles or examples that I can refer to ?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you use the browser developer tools (right-click an element and click "Inspect") on the item you want to click and share what the selector looks like? Then do the same for the second item. Please share screenshots. Maybe then I can suggest how to build your custom selector for it to work dynamically in a loop.

     

  • nraindmia Profile Picture
    on at

    Hi @Agnius ,

     

    This one to select the first candidates from the list, 

    nraindmia_0-1700120422234.png

     

    then click triple dot button

    nraindmia_1-1700120511475.png

     

    then click download resume button

    nraindmia_2-1700120565025.png

    then repeat the same step for second candidates and loop this process for top 10 candidates

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You will likely need to modify your selector to include more than just the <a> element. Include some parent elements up to the point where you target the specific <div> that contains the entire data structure for a single candidate. And then pass the %LoopIndex% value into the selector next to the <div> as an ordinal value, so it looks like this:

    div:eq(%LoopIndex%)

     

    This will make the flow target the correct item.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    Do you have any simple example i can refer to?

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I do not. I would recommend re-watching the video tutorial I shared with you and try to apply it to your case.

     

    What you have there is a selector that was automatically generated by PAD, and it only includes the very last element you need in the entire HTML structure.

     

    But if you tick some check boxes in the selector editor, you will see your selector becoming longer, as you include more parent elements and make the path to the specific element you target slightly longer:

    Agnius_0-1700369101952.png

     

    (this is a completely unrelated example of a random element in a project I worked on myself)

     

    When you've done that, you can add parameters and variables to the parent element, and not the <a> element. I's a child and you don't really need to modify it. What you do need to modify is the <div> that contains all the data for a single candidate.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    Hi @Agnius ,

    This reallyyyy helps me solve this issue. Thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard