I need my automation to select a Ui element based on an anchor which could change. Thus, I have been trying to implement dynamic selectors by changing the “aaname” of the anchor element to a wildcard / argument which would be assigned the value I want.
Although this works if I assign the argument a default value, it will not work if I assign this argument to a variable that contains the value I want. When I try this, I get this pop up (see attached picture).
Ultimately, I need the latter option to work because this workflow will be invoked and the value of the “aaname” will be passed from variables in the main workflow to the arguments in this invoked workflow.
So to repeat my question: is it possible to assign a variable to an argument (during an invoked workflow) and then use that argument (without a string default value) as a wildcard for a dynamic selector?
Make sure you don’t have a variable with the same name as the argument. Also, that first screenshot you posted is because you’re trying to use a variable while designating the selector. I find it’s easier to just let it get the selector with the specific text, then copy/paste the selector into notepad and edit it manually to replace with variables. Then paste back into the activity’s property.
I generally use strict selectors as long as they work, whether I’m using variables or not. I prefer to have my selectors exact, and don’t really like how fuzzy will find things that are close. Close is not right, in my brain.