Micro Focus QTP (UFT) Forums
Best method to test Login validation - 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: Best method to test Login validation (/Thread-Best-method-to-test-Login-validation)



Best method to test Login validation - defcon3 - 05-28-2012

Hi

I'm working on a log-in functionality for a webpage where the same object (dialog box) is displayed to the user but displays different message depending on if the correct password/invalid/blank/not enough characters is entered by the user.

I'm looking for a solution from a formal test perspective i.e. I need test evidence for each log-in data. Currently I'm using CaptureBitMap to save images of every dialog box displayed but I'm testing with lots of different data and don't want to save images for that much data. There must be a way of getting the dialog box properties (hopefully unique for each message) from the box, best would be to read the text directly off the box and save to excel/text file. Can anyone suggest the best method to use, should I use the dialog box properties method or should I try and create checkpoints? I tried using a simple text checkpoint but I can't highlight the text on the dialog box so QTP can't read it.

Any ideas would be much appreciated.


RE: Best method to test Login validation - Sathiya - 05-29-2012

hi,
my advice is dont go with check point or bitmap concepts. instead of that try to get the text in the message box using innertext property or label property and compare the label values using INSTR.
try and let me know. meanwhile ill try to do the same for qtp forum login.


RE: Best method to test Login validation - defcon3 - 05-29-2012

Sathiya - thanks for your reply.

I have solved my issue using your idea of getting the property of the dialog box, the box displays the different messages at runtime so I used the GetRoProperty method to pull the "attached text" property which contained the text on the box.

Thanks.