0

I'm working on an html table with links where I keep on extracting data using standard and custom PAD/jQuery selectors. To loop through all the rows I basically extract the id of the link/anchor tag which has the row number needed. The issue is that sometimes the next row number increases or decreases to a number that doesn't make sense from a logical perspective eg. 1,2,3,4,300,301,302,1,5,10 (Probably because the data is coming from other tables, which I can't really access)

So I wonder if there's a way to select the closest anchor tag, or maybe the next element with an anchor tag using jQuery selectors and without using the JavaScript action.

for instance, with code we can do:

  1. element.next('a')
  2. element:contains(SomeContent).next('a')
  • whatever we wish to do with jQuery

So I know we can use JS and jQuery functions to achieve that, but I wanted to do it without having to write code.

Any ideas or maybe syntax to use those functions with custom selectors??

jsbrcad
  • 33
  • 1
  • 7

1 Answers1

0

you can use : $('your-selector').next().filter('a'); and after selecting your desired element you can manipulate its values with .val('value') , .text() ... you can checkout other jQuery functions here :https://www.w3schools.com/jquery/jquery_dom_get.asp

Hach Rbh
  • 1
  • 1
  • Sorry Hach, I believe you didn't understand my question. Yes, that works but I'm asking how to do it in Power Automate Desktop. – jsbrcad Mar 27 '23 at 03:24