Micro Focus QTP (UFT) Forums
Need Help to capture the flight confirmation # - 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: Need Help to capture the flight confirmation # (/Thread-Need-Help-to-capture-the-flight-confirmation)



Need Help to capture the flight confirmation # - Meem - 05-17-2014

Hi All,

I'm trying to capture this confirmation no from the Qtp demo flight application which is dynamcic .
"Flight Confirmation # 2014-05-16232612"
can some one please help me out here to capture this dynamic confirmation number with regular expression.


Thanks


RE: Need Help to capture the flight confirmation # - ravi.gajul - 05-21-2014

use regular expression Flight Confirmation.* in the object repository. Then use getROProperty("<<property holding this value>>"). The output of this is the entire string "Flight Confirmation # Dynamic number" .Now from this string, extract the number you want.Hint : Use mid function.


RE: Need Help to capture the flight confirmation # - Meem - 05-22-2014

Thanks Ravi for your reply. I used descriptive method with .* after # worked fine. I also use the mid function to just capture the flight no.

Thanks again.