Above the output of table extraction value from the page and stored in Data table
We need to get the row rumber if the text contains (.png) in “F” or “Column-4 Src” column to pass that row value to table row of download selector. (<webctrl aaname=‘Download’ tableRow=‘121’ tag=‘IMG’ /> )
How to get the row number if the text contains (.png) in “F” or “Column-4 Src” column?
So that I can assign that variable value for “TableRow “ of download selector and click inside for each row activity?
When we go ahead with the Datatable, the index starts from 0, hence you get the index numbers in that manner based on the datatable rows and not the Excel row numbers. To get the Excel row numbers, you would need to add +2 to the index retrieved.
But again it also seems that you wouldn’t require the Excel row numbers, as you are trying to target the Download button in the Selector.
Just check the row number in the First Download button (which contains .png) if it is equal to the index retrieved for that using the Datatable. If it is equal it would mean that the row indices in the Application Table also starts from 0, else we need to add the offset accordingly to it to fetch the correct row index.
Is it necessary for you to extract the data or are you extracting only for finding the row number?
This looks like a classic case for for each ui element activity
That will solve these issues for you and you have filters which you can include to check for png and etc
For each ui element you can use on the row directly instead of cells you need…that way all data can come in one aingle innertext also and then index if needed can come from the for loop index only directly…
Even the same can be obtained by using for each row activity in the properties for for loop…no need to do indexof function again
Use for each ui element activity and indicate downlooad button if you want to click on every download
Else if needed only selective download yhen indicate whole row as one element and then get the innertext…and check for required values if present then you can do get children on row to get the downlod button and click it…else can use the index from for loop peoperties and use it…(currentindex) in your selector if the innertext contains the required values
First check if there is difference between the selectors of download buttons for german and english…if there is then we can choose one in for eqch ui element activity
Or
As you are already using we can use the same way…but to get row index you can directly use the property in for each row activity instead of indexof function again
I have applied the same logic … but it is still giving wrong index number
Attached the table extraction output file for your reference. Can you replicate with the file attached?