Find children - Delete each row

I have a shopping cart, and I’m using the find children activity to return all the rows in the shopping cart. Each row has a trash bin next to it if you want to delete that Item.

I’m trying to delete all of the items. Here is my full selector for the shopping cart.

<webctrl id='scart_divdetail' tag='DIV' />

I can’t select the whole row, only the individual columns of that row. I also can’t select a full column. I can only select the table data in any given row/column

Here is the selector for one of the table data that contains the trash Icon.

<webctrl name='deleteItem' parentid='row_37_01_09_2019' tag='IMG' tableRow='1' />

I’ve tried to filter the children with

< webctrl tableRow=’*’/ >

And it will only click the trash Icon for one row.
I need all of the rows to be deleted, so each trash Icon needs to be clicked for each row.

Am I using the find children filter incorrectly?

Just off the top of my head, have you tried filtering the Find Children by name=‘deleteItem’, or by tag=‘IMG’, so you get only the children that match those attributes. Then, run them through a ForEach with a Click inside.

There are other approaches too, like each one has a tableRow attribute, so you could simply use Extract Structured Data (Data Scraping) to pull in all the row data, run that through a For each, then use the index or row counter in the tableRow attribute to click each Delete icon for each row… if that makes sense. Essentially, each time it clicks the Delete icon, the row number will have increased by one, so ... tableRow='"+rowNumber.ToString+"' /> would click each one in the loop.

And, sorry, I’m not an expert on Find Children filters and whatnot.


I want to avoid creating an entire data table just to delete on average one or two items. So I really would like to use the find children activity. I’ve used it before without any issues. I’ll go back and look at those. Maybe I can see what I’m doing wrong. Maybe it’s just the table. I don’t know!

I ended up figuring it out. I used find Descendants instead. And I had to indicate exactly what the descendant item was that I was looking for. You really have to filter out the children with the right selector.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.