cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Pagination error

I just want to extract multiple tables from different pages of same website. I did following process

1) "Lunch new firefox":   and assign this website '''https://www.nepalstock.com.np/floor-sheet

2)"Extract data from webpage": I select extract entire HTML table and "Set Element as pager". However its not working as it extract only 1st page( I tried "all available pages", "only first page"etc. But not working as it is extracting only one page.

 

When i run second variable only, it shows " Argument 'BrowserInstance' must be 'Web browser instance'

I am very new on this field, pls guide us somebody.

 

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pavel_NaNoi
Impactful Individual
Impactful Individual

Its because the pager needs a "span" element, but its hidden under the "a" selector for the pager, to fix this, go to the advanced settings, and simply put a "> span" at the end of the pager selector, like so:

Pavel_NaNoi_0-1674493593388.png

 

View solution in original post

Highboy
Super User
Super User

Wow well done 😊

View solution in original post

26 REPLIES 26
Highboy
Super User
Super User

Could you give me an example with data on the webpage?
Show me a picture of what you are trying to extract.

I want to extract data of https://www.nepalstock.com.np/floor-sheet.

It display 20 line item on time, but there are 2934 pages.

Picture attached is one page, i want all pages to be extracted

Please help me on this.

Highboy
Super User
Super User

Hmm have tried lots of different selectors, and it should work, but as you have noticed yourself, it does not work.
It should, but dont 🙄

I have no idea why.

If I find it, I will tell you.

Pavel_NaNoi
Impactful Individual
Impactful Individual

Its because the pager needs a "span" element, but its hidden under the "a" selector for the pager, to fix this, go to the advanced settings, and simply put a "> span" at the end of the pager selector, like so:

Pavel_NaNoi_0-1674493593388.png

 

Highboy
Super User
Super User

Wow well done 😊

It worked exactly how i want. Thanks a lot @Highboy 

I can't take credit for the solution.
It was Pavel_NaNoi who solved it.

Hi Pavel_NaNoi, I have a similar problem, but in my case its not giving me any error but only capturing the data from the first page and stops, I recently updated my Power Automate Desktop Ver to 2.30.109.23075 and my Script has stopped Paging function, Now as I am changing the pages the element for the Paging selection is not at the same place ...

On the first page the CSS Selector code is html > body > main > div:eq(1) > div:eq(4) > div > div:eq(0) > a:eq(6)

On the Second page the CSS Selector code is html > body > main > div:eq(1) > div:eq(4) > div > div:eq(0) > a:eq(8)

On the Third page the CSS Selector code is html > body > main > div:eq(1) > div:eq(4) > div > div:eq(0) > a:eq(9)

and so on, can you please help me on this ... I have attached the screenshots as well, do let me know in case you require any additional details.

I think in your case all you have to do is remove the ":eq(#)" at the end of a, so that it looks like this:

html > body > main > div:eq(1) > div:eq(4) > div > div:eq(0) > a

this will make it generic, and it should always select the pager no matter what.

Hi thanks for replying ... I changed the code as mentioned but now it is only repeating the paging by clicking on 1 and copying the same data repeatedly.

Right, my bad, I looked through your screenshots just now and realized it increases by 1 due to an increase in the amount of page buttons, so can you change it to the following for me:

html > body > main > div:eq(1) > div:eq(4) > div > div:eq(0) > a:contains(Next)

If that does not work, can you go into dev tools (F12 if you're on chrome) and use the element picker (usually has a ctrl+shift+c shortcut, but otherwise just looks like a mouse icon hovering over something) and select the "Next" button element, and then send me a screenshot of what it jumps to in the developer code?

Ignore Please

Well the other code also did not work, I am sharing the screenshot of the element screen.

There's a little arrow next to the <a that was selected, can you expand that for me and re-send the screenshot?

 

Also, asking just in-case but, can I get a link to this webpage? I could probably get this done much faster if I could just take a look at it personally.

Here's the detail for the page https://www.screener.in/

Also, I have the specific template for my reports which is saved in my profile, Is there a more secured way so I can share my credentials ?

I am sending you a Private message.

Feel free to just private message me your email / phone so we can set up a teams / phone call instead as well.

Try the following code, copy-paste it into a blank new flow, just literally CTRL+A, CTRL+C the code inside the .txt file and then CTRL+V into a blank space in Power Automate Desktop.

 

Unfortunately we cannot use the pager in this case, so instead I've created a manual one for you, the reason for this is because we got an annoying pager on our hands, I'm not exactly sure what's causing such a logic issue, but from what I could gather - because the number of "pages" increases, i.e. the previous button appears, and one additional pager number appears this confuses PAD and it flops, I know its this because, if we go to page 7 and try the same pager, the pager element will work flawlessly with the extract from webpage action, until the last few pages where the number of pagers change once again. Usually this shouldn't be a problem, but sadly it is in this case.

 

If you got anymore questions let me know, also change your password afterwards if all is fixed.

Hello Pavel_NaNoi,

 

Thanks much for the amazing code, well being a new bee to CSS & PAD that code looks like rocket science to me 🙂

 

Well actully thats not the format and query that I run regularly, I usually use different queries and have made multiple variables for the same, now also the data that is extracted on the spreadsheet by the automation is not in right format, I append a macro to bring it to the required format after the data is downloaded .... Just to explain in detail here are the steps that the automation runs to capture my data ...

 

All with " " are Variables that I have set in the project.

1> Launch new Crome > "Homepage" the "URL"

2> Login to the website with "Credentials"

3> Go to script Page "URL"

4> Append the "Query"

5> Extract data from the data generated >> { This is where I am seeking help}

6> Create Excel file in "Path"

7> Enter data to the Excel/Save & Close

 

Now because my table and query changes, I have made multiple variables for the same, but as the Pager function is not working the automation is now stopping on the first page.

 

Is there any other way where I can look for the NEXT Button and append the pager script ? or if I can add one or two more but simple functions ...

 

Appreciate your help !!

 

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 (2,095)