Does the dynamic selector support addition operation?

I’m trying a dynamic selector with the following format.

<webctrl aaname='*' css-selector='body&gt;div&gt;div&gt;div&gt;div&gt;div&gt;div&gt;div&gt;a&gt;div' parentid='root' tag='DIV' class='items-center*' idx='7 * {{ii}} - 4' />

It seems the selected element is idx='7 * {{ii}}'but not idx='7 * {{ii}} - 4'. I know it can solved by assigning 7 * {{ii}} - 4 to a new variable. But I’m curious if there is a straight way to make it?

Thank you.

Hi @Li_Eric,

As far as I know, the selectors are treated as string, and you cannot perform any operation in the selectors. You have to assign it to a variable and then pass it on to the selector tags.

@Li_Eric

Selector if you observe in properties panel will use string.Format so instead of only ii you can use 7 * ii - 4 completely as the input in string.format

Eg: string.Format("<webctrl tag ='div idx={0} />",(7*ii-4).ToString)

Cheers