Dynamic UI element table - Please Help


My problem is somewhat similar to: [Need to iterate through a dynamic UI element table]

I am needing to input values from an excel sheet into certain UI elements in a web-based table.

I am using a for each excel row activity, and per the attached xaml file, you can see what I am attempting.
Dynamic_UI.xaml (57.2 KB)

I have the copy and pasting from the excel sheet into the “product ID, Description, and Unit price” UI elements figured out. The part that is puzzling me is the following:

When the automation clicks the red plus sign, it successfully adds a new row, but:

It will keep adding rows as it goes through the excel spreadsheet, but it will just overwrite the first row until it is done:

I have uploaded the excel spreadsheet and the xaml in case anyone would need to look at that.

Forum_spreadsheet.xlsx (10.1 KB)

Any comments/guidance are much appreciated. Please let me know if anyone would need anything else to clarify what I am trying to accomplish.

Hi @Sc100,

Welcome to community.

I couldn’t check the selectors because I couldn’t reach the page.

My advice is to dynamically the selectors you use for the data entry activity.
Since you will be entering transactions for each row here, look for a row count selector that you can increase in the selectors.

Dozens of tests on selectors may be required. Therefore, it is very difficult to support remotely. Therefore, I can only give advice.


1 Like

Hello @Sc100

Here if you want to add new rows by clickin gon + button and need to add data to the newly created rows, then you need to identify the proper selector for the each cell.

What you can do is use Uiexplorer and inspect on the cell, there you should be able to find some attrbiute like idx or rownum, which is dynamic and incrementing for each row.

That attribute value you need to replace with a dynamic counter variable and you can type.

1 Like

U should make Selectors dynamic.
you can increase the rows by passing a variable counter in selector, then you can increment the counter every time you add a row until some condition is met. :slightly_smiling_face:

1 Like

Muhammed, Rahul, and Loveleet,

Thank you so much for your replies. I will attempt this, and will post screenshots/code of what I did come up with.

Many thanks again. Talk to you all soon.

  • Sean
1 Like