One dynamic selector to fill the whole web form

Hello dears,

how can I use one dynamic selector and one “Type Into” activity to fill this web form

using this excel file

Why do you have to be restricted to one selector and one type into? It has to be at least one type into for each of the fields…

1 Like

Use config file to store selectors for all textboxes.
Read Range to read all the selectors into DataTable

How to fill data

Inside your data filling foreach, add one more foreach for selectors datatable. Get field data from outer foreach and selector from inner foreach and pass it to single TypeInto.

Thanks,
Ashok

1 Like

Yup, I used many “type into” activities but I’m trying to think of a better way to use few selectors as much as possible

May you explain it more ?

is that webform available publicly? please share the URL

@Mohammad_Allan

You dont need to store all selectors…what you need is a datatable with mapping of column name and the aaname or innertext that changes for each field…

Then in the selector you can add a variable and loop on the mapping table and get value from actual table using column name and write it to required text box using mapping name as variable in the selector

Generally selector might be like this

<webctrl tag='input' aaname='{{mappingname}}' type='text' />

And whole process would look like below

  1. For each row in datatable for data to be looped currentrow
  2. For each row in datatable for mapping table mappingrow
  3. Type into with selector as above instead of mappingname you would use mappingrow("mappingcolumnName").ToString
  4. In the type into field use currentrow(mappingrow("ExcelxolumnName").ToString).ToString

Cheers