How to create dynamic selector for 'get text' activity on a cell of a table

Hi All,

I am trying to use a dynamic selector for ‘get text’ activity in UI Path, but it is not working. I am trying to store the selector string in a variable and using the variable in the selector property of ‘get text’ activity. Here is my selector string. Please help!




Selector looks ok.

May I know what error are you getting here. Please share screenshot of the error message.

I am not getting any error. But, it is not giving me the right results. rowNum is the row number variable that needs to get the data from each row. So it should give me the data from row 1, 2, 3,4 … But it is getting only the data from row 1.

@harmeet_kaur Are you incrementing the row number once it gets the data from row1


I guess you missed to increment rowNum variable because of that you are always getting data from first row.

hey, you have to use a do while loop



Yes, I am incrementing the rowNum as it is already inside the forEach loop. I am using data table and then forEach loop. This rowNum variable is incrementing inside the for each loop

Hi @harmeet_kaur ,

Would you be so kind as to share a snapshot of the Workflow you have developed so far?

Also, could you open the Selector Editor and send us a snapshot of that?
It should look something like this →


Kind Regards,
Ashwin A.K

Hi @harmeet_kaur ,

Make sure that the rowNum or the variable that you use in the Selector is a String Variable.

If the rowNum variable is an Integer variable, you can use/create another variable str_rowNum. Assign the rowNum value to it using Assign Activity in the below way, you can then use it in the Selector :

str_rowNum = rowNum.ToString
<webctrl tag='TABLE'/> <webctrl isleaf='1' tableRow='{{str_rowNum}}' tag='TD'/>