what i m doing
Step 1going to link where internet data table is there
Step- 2 scraping the data
Step 3 stored in output datatable
Step- 4 taking it in loop
Step 5 double clicking on each row
but the step 5 is not working and it is clicking on same row everytime.
You need to modify the selector for the double-click activity so that it increments to the next row.
With data scraping, you only read the values, but looping over that scraped table won’t automatically iterate through the internet table on the browser.
Look at the selectors for
Lours Meyer, and then
Thriveni NS
See how they are different (open UiExplorer and look for aaname or id or something that is different but consistent)
For example, id = "row1" id = "row2"
If you see something like this, then you can use the CurrentIndex property of the for loop to find the correct cell to click on during each iteration.
As @mwerner suggested, in this case, tableRow is as good a unique attribute as any.
Notice it present as just a single digit (2 and 3 from your screenshots) while the tableCol is 5 in both cases - which would be the element you want to double-click.
Include tableRow and tableCol in your selector and get rid of other random-value attributes such as parentid, idx, etc. TD could be left in as it’s indicative of the HTML component.
Use CurrentIndex to match the selector row index. CurrentIndex is a readily available variable in for loop (you can find it in properties panel of For Each Row)
Use variable syntax for selectors (which is {{variableName}})
e.g. tableRow='{{CurrentIndex}}'
You have declared sCurrentIndex = "outDt.Rows.IndexOf(row) + 1" where the right hand side is a literal String. This won’t get you the expected value.
You would want to use sCurrentIndex = outDt.Rows.IndexOf(row) + 1
In fact, you shouldn’t have to use it or increment it.
The For Each loop gives you the index readily in this property:
You don’t have to initialise with a value. You need to specify a variable there which will auto-increment as the for loop executes.
For example, specify sCurrentIndex as the variable in Output property. (Make sure that it is of type Integer otherwise compiler will complain)
Then, as the for loop runs, sCurrentIndex will get a value automatically.
Check the value, if it’s not exactly corresponding to the selector value, find the difference and use it.
For example, since your table has a header, the column header will have tableRow = ‘1’, and hence your first record has tableRow = ‘2’
Although when you iterate on your table, the first row will probably start with index 0, so the loop will set sCurrentIndex = 0.
To match your first row in the table on your webpage, use temporary addition to get the right value: tableRow = '{{sCurrentIndex + 2}}'