![]() |
Verifying the text on the dialog box - 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: Verifying the text on the dialog box (/Thread-Verifying-the-text-on-the-dialog-box) |
Verifying the text on the dialog box - americaneagle18 - 01-26-2009 Hi, I need to verify the text on the dialog box that appears on clicking a button. I'm using the following statement Code: sText = Browser("abc").Dialog("Microsoft Internet Explorer").GetVisibleText The text on the dialog shows as abc xyz 123 The value of sText during the script run shows as Microsoft Internet Explorer abc(somecharacter)(somecharacter)xyz(somecharacter)(somecharacter)123 How do I compare the text and how do I use the regular expression? Thanks a lot in advance! ~Gan RE: Verifying the text on the dialog box - Ankur - 01-26-2009 Did you try the "Object Spy"? Once you see the required value, capture it using GetROProperty. RE: Verifying the text on the dialog box - VENKATAREDDY_M - 02-11-2009 Hi, You can use below Reg Exp Pattern Code: "Microsoft Internet Explorer abc\([a-z\d]\)\([a-z\d]\)xyz\([a-z\d]\)\([a-z\d]\)123" Thanks VENKATA |