How to set dynamic selector

Hello,

Yet another stupid question from a new UiPath developer.

As a follow up to my previous question, found here How to do tasks based on excel or data scapped input

I have scraped a table which i save and store in a excel for later use.
My understanding is I can now read range from my excel file to populate a datatable, correct?

Now to my issue at hand:
In my web application I need to highlight and click on a specific line which get a unique Id, a index number so 1… 2 and so on.

So by that I know my first row in my excel equals to Id=1.

How may I setup a dynamic selector so the robot will click on row id 1, 2, 3 and so on?

Thank you!

@j.sorman
Have a look here:

2 Likes

So in this example I would have to make the robot open the excel application and make a selector of each row instead of work from a datatable (or collection as I would tell myself in Blue Prism language)?

@j.sorman

let assume following:
your data is in a datatable
within a for each the index output is configured e.g. with var name idx
the selector for clicking on the web element is dynamized with the approach from above on idx

then with chaging idx the Bot should click on row / element 1.2.3.4…

For me, it’s solved my problem. Thanks!