Micro Focus QTP (UFT) Forums
Regular Expressions - 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: Regular Expressions (/Thread-Regular-Expressions--4747)



Regular Expressions - Charanpreet - 04-25-2011

I have a list of buttons. And Button is type of WebElement Link like mentioned below:-

Its outer HTML is as follows:-

Code:
<A class="abc" title="xyz" href="#a_b_DM_c" name=center jQuery1303725751136="4"></A>

Only thing in above outer html, class and href is changing. So at runtime am using regular expression in outerhtml property to recognize the webelement as :-

Code:
objBtn = "*.a_b_DM_c.*"

But this type of regular expression assigment is not working. Could anyone tell me how to use the string in between and use regular expression on both the sides of String. Any help will be appreciated. Thanks.


RE: Regular Expressions - supputuri - 04-25-2011

Hi Charan Preet,

I hope you added the object to OR, if not first of all add the object to OR.
And use regular expression ".*a_b_DM_c.*" in the OR and make sure that you have selected regular expression.
Msure that the object is identifying with the current regular expression.
The option would be using SetTOProperty to handle such situations.