Micro Focus QTP (UFT) Forums

Full Version: Regular expressions for webelement text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?
try with Exec Time:\d ms -" and let me know