How to extract table data from a webpage while IDX attribute keeps changing


#1

Hi All,

I am trying to extract the contents of a table on a webpage. And there are 100s of such tables, to go to each table there is an arrow button on the webpage. Now the problem i am facing is, when i click on arrow button, the value of IDX attribute in selectors changes for every table. And since its a dynamic value every time, i am unable to build logic to crack this.

<webctrl tag=‘document-set-tile’ class=‘ng-isolate-scope’ idx=‘3’ />

<webctrl tag=‘document-set-tile’ class=‘ng-isolate-scope’ idx=‘2’ />

Any leads/hints are highly appreciated.

Thanks & Regards,
Arun Sharma


#2

HI @arun_sharma,

Remove the IDX attribute and try again.

else add the parent nodes also using UiExplorer to get exact selector.

Regards,
Arivu


#3

Hi @arivu96,

Thanks for your pormpt response, but I tried these earlier. After removing IDX attribute, it does not pick anything. Also if i select parent nodes, again it select random items from webpage. :frowning_face:

regards,
Arun


#4

Hi @arun_sharma,
If you are trying to extract contents of a table then please try this approach,

Thanks,
Anjali


#5

Hi @anjalimishra,

I have seen this thread earlier, but in my case I am not able to scrap table data without “idx” attribute.
So when i keep the same idx and go to next page-table, it picks up data from previous table that was in previous page. So i have to identify the “idx” attribute value at run-time(i believe). :frowning_face:

Regards,
Arun


#6

Ok, I was able to solve it by manually updating the “idx” attribute and building the XML extract on the runtime itself as it was taking only 3 values