How can i insert variable in a selector

Someone can help with the syntax to insert a variable into a selector.

I need to insert a variable named “var1” just where the numbers are underlined in yellow. How can I concatenate this operation to respect the quotes? ? ¿

Thank you very much and greetings.

<ctrl automationid='Row_" + var1 + "' name=..... />

1 Like

Unfortunately it is currently not possible to convert from a classical selector like the on your see there, to one with a variable. You have to close the window, then to the right when you see the first ~20 characters of the selector (as a string with quotationmarks around it) you should add something like var + to make the UI understand that this is code and not a full selector.

Now when you open the same view you should be able to insert your variable with plusses and quotationmarks, like KarthikByggari has described.


Edit the selector here:

Note: once you break the selector by editing, clicking the 3 dots will open the “Expression Editor” which will be easier to edit in. You will be able to concatenate variables when you edit the selector as an expression. (for example aaname='"+variable+"' />")


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.