Micro Focus QTP (UFT) Forums

Full Version: Not able to use wild character in string
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am having difficulty in defining a string variable.
Its value is dynamic with only one digit change.

Dim Action, string1
string1 = "Actions;"&Action&";Affected Objects (1)"

In above case the the value of digit in closing parenthesis is dynamic.
I want to define string1 such that it will identify string1 for any value in parenthesis.

I tried to use wild character * and # but its not working.
Please help

Regards
Amit
What exactly you are trying to do?
-Adding object to OR to identify the element on UI? or Compare the value with UI value?
Hello Supputuri,

I am trying to identify the element on UI. The value of element is dynamic (only one character is dynamic).

JavaWindow("window").JavaTree("JTree").Select "Actions;"&Action&";Affected Objects (1)"

- Now in above case the value of digit in closing parenthesis is dynamic.
i.e. JavaWindow("window").JavaTree("JTree").Select "Actions;"&Action&";Affected Objects (2)"
JavaWindow("window").JavaTree("JTree").Select "Actions;"&Action&";Affected Objects (3)"

- I want to select the element in tree irrespective of any value in parenthesis.

Thanks
Amit