WaitProperty or checkproperty - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: WaitProperty or checkproperty (/Thread-WaitProperty-or-checkproperty) |
WaitProperty or checkproperty - jove1776 - 10-20-2010 Hi I am a newbie here with QTP but would like to ask a question about checking text on a pop-up. The text says "MESSAGE: :File was successfully uploaded " Also object spy says: <multi-line value> Code: Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").WaitProperty "text", "MESSAGE: File was successfully uploaded " Also In the object repository the text property is set to: MESSAGE: File was successfully uploaded (guess there was a new line character there) so I set it (in the Object properties) to: MESSAGE: File was successfully uploaded.* and regular expression is ticked. If I click locate in application it finds the text, except that when I run the code it doesn't seem to work. Any pointers in where I am going wrong? RE: WaitProperty or checkproperty - jove1776 - 10-20-2010 i think the problem is the new line character on the pop-up. i cant change this infortunately. if i set a watch on the text propert I SEE the little square character that normally denotes a newline. Any ideas on how you check say the first 10 characters on the pop-up and no more? Instead of the whole string. RE: WaitProperty or checkproperty - KavitaPriyaCR - 10-21-2010 Hi, have you tried this Code: Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").CheckProperty "text", "MESSAGE: File was successfully.*" RE: WaitProperty or checkproperty - jove1776 - 10-21-2010 Hi there, thanks for taking the time to respond. It does not work. The object repository, the text property: Do I need to update this property to be: MESSAGE: File was successfully.* also? I will have to revisit my QTP notes as this little issue is driving me crazy RE: WaitProperty or checkproperty - KavitaPriyaCR - 10-21-2010 yes, update that in OR also and try. RE: WaitProperty or checkproperty - jove1776 - 10-21-2010 also I tried: Code: Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").CheckProperty "text", "/MESSAGE\: File was successfully\/n/" Doesnt work The error message says: Propert text is empty... Seems to work with the following: Code: Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").WaitProperty "text", "MESSAGE: File was successfully uploaded" & vbNewLine & "", 1 This i need to brush up on this |