I have tried adding the “text” attribute to a selector. The text attribute and value were found with Ui Explorer. I have tried dragging the text attribute to the selector, adding it manually (adding "<text=‘textvalue’ />), but it doesn’t seem to work.
Is the only way to paste the selector value as string in the selector field of the action?
Hi,
In the activity you are trying to add variables
Please click on the activity and click the selector instead of opening the selector.
Now pass the variable where ever you want and like this “+variable+”, the variable should be of string type or else should be converted to string type using .tostring
I have tried reading the attribute, then adding it the way you suggested:
It goes like this:
"<ctrl text='+"varSelector.ToString"+' />"
However, when I try to run, it throws an error. The attribute “text” only appear in the list of properties when I access it through Ui Explorer, but it seems like I can’t add it to the list of selectors.
The error thrown is “can’t find the UI element corresponding to the selector”.
Hi,
you copy the selector from Ui Explorer to your activity and then in the activity instead of opening the selector by clicking the 3 dots, you can click the selector and change it there.
Let us know if this helps,
else please see the screenshot and let us know if this helps,
Click the yellow region and give your selector and pass the variable there instead of opening the selector.
Thank you for your prompt responses. I have written the selector in the selector field, following pavanh’s steps and efleurent’s structure/writing.
However, when I ran the script. It didn’t work. You’ll find attached a screenshot of the attribute I want to add.
Is there any way I can just grab it? The issue for now is not setting the attribute’s to a variable, but simply adding the attribute to the list of selectors. I want to add the text attribute to my selector. Therefore, my selector value was:
The “Get attribute” activity gets the value of the attribute we input.
I was able to get the value of the text attribute with that. How could I add any attribute from the property list into the selector?
Following @pavanh003 instructions to enter the selector as you please, you can also use the variable that the Get Attribute activity outputs and add it to your selector by using the same structure I suggested earlier.
Are you able to share your workflow? If not, please try and follow something along the lines of my screenshot. Note: the attributeAcquired string variable is the output of the “Get Attribute” activity.
You’ll find attached the workflow. I am not sure I understand why you added the attributeAcquired at the end on the selector expression. Shouldn’t it be within the selector (it should basically be replacing the varSelector variable)?
Hello Ben, I think I solved this a different way …
Click on the [Property Selector or 3 Dots icon] either will work . In the 'Edit Selector" region enter the name of the attribute or element that will receive the value in my case it’s labeled as value so (Value = " Some Value Here ") , within the parenthesis you can RIGHT CLICK and it will allow you to pass in a variable to populate the field Dynamically , not it reads:
value=“{{inputName}}” //Write it just like that where inputName is the variable value
as it is an older topic lets set it to current level.
For dynamizing a selector we do use the template syntax:
possible selector attributes we do see on the UiExplorer right side top corner.
Left side bottom we do get listed all available attributes. Not all attributes from there (left bottom) are available to use ist within a selector.
So attributes from right side top only can be used