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 / CSS selector for next ...
Power Automate
Answered

CSS selector for next page

(0) ShareShare
ReportReport
Posted on by 32

Hi,

I have a problem with how to properly set the CSS selector for the next page.

 

CSS selector for the next page is different because it depends on the number of the current page.

 

If I am on Page #1

CSS selector for the next page is:

html > body > div:eq(2) > main > div:eq(2) > div:eq(0) > div:eq(7) > div:eq(0) > div:eq(3) > ul > li:eq(6) > a

DejanLazarevic_0-1635714625924.png

 

If I am on Page #3

CSS selector for the next page is:

html > body > div:eq(2) > main > div:eq(2) > div:eq(0) > div:eq(7) > div:eq(0) > div:eq(3) > ul > li:eq(7) > a

 

DejanLazarevic_1-1635714698057.png

If I am at Page #4 and above

CSS selector for the next page is:

html > body > div:eq(2) > main > div:eq(2) > div:eq(0) > div:eq(7) > div:eq(0) > div:eq(3) > ul > li:eq(8) > a

 

DejanLazarevic_2-1635714817749.png

 

DejanLazarevic_3-1635715653342.png

 

Also, I tried with option Set element as pager but it is the same situation.

 

div[id="amasty-shopby-product-list"] > div:eq(0) > div:eq(3) > ul > li:eq(6) > a, html > body > div:eq(2) > main > div:eq(2) > div:eq(0) > div:eq(7) > div:eq(0) > div:eq(3) > ul > li:eq(6) > a

 

Is there any way to solve this situation?

 

Thank you for sharing your expertise and help.

Dejan

I have the same question (0)
  • Verified answer
    Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Right now your selector is dependent on the amount of pages in the list.

    You will probably have to input a custom selector that relies on the arrow icon. If you press CTRL+SHIFT+C in your browser, the developer tools will open in inspection mode, and once you click the NEXT arrow, you will be able to see how it is placed in the page's code.

    (My guess is that) You must then remove the :eq(x) part of the li:eq(x) and add the arrow to the selector. Typically  something like this. Look at the ending:

     

    html > body > div:eq(2) > main > div:eq(2) > div:eq(0) > div:eq(7) > div:eq(0) > div:eq(3) > ul > li > a[class="icon-arrowright"]

     

    Play around with it... If it is a public website, you could share the address.

  • priyanka2309 Profile Picture
    2 on at

    https://www.flipkart.com/search?q=mobiles&otracker=search&otracker1=search&marketplace=FLIPKART&as-show=on&as=off

     

     

    here i need to select the next button and then extract all the datas as am new to powerautomate please help me on this

  • Shish74 Profile Picture
    3 on at

    Hi, I am having exactly the same problem while extracting data from Trip advisor using power automate. Whil it is picking the data very well for page 1, the pager command for next page is not working. I need your help to solve it.

     

    Am sharing the page link, for which i need the data, its right now 4 pages, but the same can be much higher.

     

    https://www.tripadvisor.in/HotelsNear-g12034122-d10029263-Kalyan_Grand-Vandalur_Kanchipuram_District_Tamil_Nadu.html

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 269 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 184 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard