Support > Forums > OpenBots Studio > Web Automation Wild Cards
Good day. I'm trying to add a string variable as a parameter value for a Native Browser Command to find a certain text that changes places in a page, I was able to use the * character to act as a wildcard for most of the path but on the final inner text parameter it does not validate the element which I intend to click on, for example. If the path I build has "Inner text" : "123" it will validate towards the word 123, but if I store the string "123" in a variable vPath and add it to the path as "Inner text" : vPath, it fails to validate. How can I add a string variable content as the element I'm trying to point to?
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hi alfredo,
Thank you for sharing your query.
you can use string value inside the Parameter value for the "Inner text" parameter using wild cards () Ex. "Learn to cod". Also, you can use string variable contain the string value.
and if you want to use dynamic selector for that, you can use a variable inside the selector by concatenating them in the parameter which requires the dynamic value. For example, you can use the format: $"{vSetVariable} to Code" put variable inside the curly bracket and gives special character (dollar $) as prefix.
When concatenating a variable, note that validating the selector will result in an error, as the variable does not have any value assigned at this time. Only running the automation will assign the variable.
One way to define a variable for validation, is to provide a default variable value under the variable pane. This will ensure the variable value is included in the path validation.
You are not authorized to reply, please click here to login and add your reply to this topic.