I have this form that I use a find children activity to get the parentids with a tag of ‘SPAN’. In my filtering, I need to get all the textboxes with an aaname that contains ‘required’. Problem is, some aanames are spelled as ‘Required’ or ‘required’. I know I can do something like *equired which works on mine. I just want to ask if there’s a much better way on doing this? Thank you.
That is probably the simplest option.
Other methods will add complexity. If you want something more direct you could add regex to the ‘aaname’ Selector.
Simply update the selector to read:
aaname = ‘Required|required’ matching:aaname=‘regex’
Where the bold text is the Regex Pattern.
However your current method is probably the best solution.
Hopefully this helps with your decision
Thanks, this would be helpful for selectors with much complex requirements.
You could also try the ‘get attribute’ activity.
Then use an IF statement to determine whether it contains Required or required.
Step 1: Determine the name of the selector by viewing the selector in UiExplorer (edit selector)
Step 2: Insert a ‘Get Attribute’ activity.
Step 3: Indicate the element on screen.
Step 4: Update the “Attribute” field from the properties panel with the name of the selector (“aaname”).
Step 5: Create a string variable for the result to be stored.
Step 6: Insert this into the “Result” field.
Step 7: Use a write line to check your result before proceeding.
I actually did this too as I noticed that some required details(like unique identifier) isn’t located at the aaname but in parentid instead. Good thing it works well on mine now. Thanks for the suggestion btw.
FYI , another solution :
We can use Case-Sensitive selector as the following
How to include the text that I need to search(the ‘required’)?
I did it like
<webctrl casesensitive:aaname='*required' parentid='form-no-1' tag='SPAN' />
but it won’t work since it needs the true or false part.
It would be as the following. Can you try this?
<webctrl aaname='*required' parentid='form-no-1' tag='SPAN' casesensitive:aaname='false' />
Thanks! It works this way too.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.