Micro Focus QTP (UFT) Forums
Regular expressions for webelement text - 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: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Regular expressions for webelement text (/Thread-Regular-expressions-for-webelement-text)



Regular expressions for webelement text - vikas_p - 02-06-2008

Hi Ankur ,
On my webpage there is a webelement having text "Pre-Authorize Basic Loan Information(Write Access) - Exec Time: 497 ms -"
The last part of the string (497 ms -")changes always , say "540 ms -" , "650 ms -" depending on exec time . Rest of the string remains same. I want to write code :
Code:
If Browser().Page().Frame().Webelement("text:=Authorize Basic Loan Information(Write Access) - Exec Time:****
").Exist(10) Then
msgbox "Pass"
Else
msgbox "Fail"
End If
Please guide me how I can use regular expression here for the last part of string .

Is it possible to do it w/o using OR ?


RE: Regular expressions for webelement text - Ankur - 02-07-2008

try with Exec Time:\d ms -" and let me know