Dynamic selector

Dear all,

my task is to loop through several rows in a table of an application.

The tricky part is, that the indexing of this app is dynamic. This means that sometimes the first row of the table has a selector containing e.g. virtualname=‘VCheckbox7246’ />, but sometimes it is virtualname=‘VCheckbox11’ />.

However, next rows are always +1. Is there a way how to investigate what the selector of the first row is as I am not able to click on it?

Hi @mario,

First get the Number using the get attribute activity

pass the selector “virtualname”
So you can get strResult : VCheckbox11 or VCheckbox7246 , etc
To get the number exactly split the string

so you can pass the dynamic selector like\

virtualname='VCheckbox"+intStartNumber.ToString()+"' />

after each row you can increment the value.

Regards, Arivu :slight_smile:



But how should I get the attribute if the robot is not able to click on the field when the attribute changes.

Hi @mario,
To get attribute Name follow the below instructions
Use Get Attribute Activity.
Selector : virtualname='VCheckbox*' />
Attribute Name : “virtualname”

Regards, Arivu :slight_smile:


Hi @arivu96

Thanks a lot for your help :slight_smile:

However, How do I know that by using asterisk, the robot will be getting virtualname from the first row, not from the fifth.