cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamPo
Power Participant
Power Participant

Loop through a table on a website

Hi,

 

I have a website with an HTML table. The first column in each row contains a link.

When clicking this link another tab opens and I have some other clicks that I run there. Once completed, I want to close that tab and click on the next link in the table.

I can't extract the links since they are JS actions and only work in the context of the page.

How do I loop through each row on the page?

 

Thanks

Sam

6 REPLIES 6
VJR
Super User
Super User

Are you able to get the entire Html table with the contents present in it? This will be into a Datatable. Then loop through the datatable and use "Go to webpage" to navigate to any of those links.

SamPo
Power Participant
Power Participant

In theory yes, I can get the whole datatable. The issue is that the links aren't static links, they are JS actions which will do nothing if used as external links. I need a way of actually clicking each on of them on the page itself.

Does the recorder give anything when you manually click the links while recording?

Is there some public website that you can point to with the Js actions.

Gidi
Resolver I
Resolver I

Have you tried to use keyboard actions to click the links?

Henrik_M
Super User
Super User

The location and selectors are not saved with the table, so you have to create a UI element to use in combination with a loop. The UI element should have a custom selector containing a loop variable that dynamically changes. If that variable is a %LoopIndex% or a %CurrentItem% depends on how your table is set up, and what your desired data outcome is.

SamPo
Power Participant
Power Participant

Any solution of exporting or recreating the links doesnt work since the application doesn't allow us to open them as standalone links. They must be opened from the main page with the table. The table is a standard HTML table and the links are in a fixed column. The table looks as follows:

SamPo_0-1657105239591.png

We need a way of looping through each 'tr' element in the table and then selecting the third 'td' element for each record. We then need to click on the link of that selected record. How can we create this loop for the table records in the HTML?

 

Example of the table: (We need to click the values in the 3rd column under 'Process Name')

 

2022-07-06_12-03-13.png

 

 

 

 

Thanks

Sam

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Top Kudoed Authors
Users online (1,886)