Validate of Dynamic Selector is incorrect

I have a label I am using as an anchor and need to change part of the selector in a loop so the correct group of labels and textbox are selector. The page works fine using this dynamic selector and when it looks at it - it shows as valid.

I then change it to a dynamic selector by pointing it at a variable and it shows as invalid.

Original value - Valid:

image

Change to dynamic selector - Invalid:

image

This should show as valid and works fine and each textbox is accessed correctly.

According the documentation, this should show as Valid.

image

The difference is that in the documentation, it creates a new variable. I used a variable I had already created. I used the dropdown “Choose a variable” option.

image

Apparently, the UiPath doesn’t like that even though it actually is valid and does work when running.

How should UiPath validate a dynamic selector? The value of your variable is generated through previous code.

Correct.

As is the variable created using the “Create variable”. Both are valid variables. In both cases, you don’t know what the value is. As the format is correct, the selector should be valid.

If I right-clicked the value in the attribute, selected the “Create variable”, it would ask me for a new variable. If I put in “temp2”, it validates it fine and would look identical (except for the name temp2 instead of temp). Neither one is used yet until we run it and in the created variable - it isn’t even used.

And temp does work perfectly when I run the project.