Micro Focus QTP (UFT) Forums
Not able to use wild character in string - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Not able to use wild character in string (/Thread-Not-able-to-use-wild-character-in-string)



Not able to use wild character in string - amit25007 - 03-08-2016

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


RE: Not able to use wild character in string - supputuri - 03-09-2016

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


RE: Not able to use wild character in string - amit25007 - 03-09-2016

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