Checkpoints - How to differential from Actual behavior to Expected Behavior - 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: Checkpoints - How to differential from Actual behavior to Expected Behavior (/Thread-Checkpoints-How-to-differential-from-Actual-behavior-to-Expected-Behavior) |
Checkpoints - How to differential from Actual behavior to Expected Behavior - rdwaram - 10-13-2009 Good Afternoon, This is my first post here on this Forum. So please excuse me if i have not posted in the correct area. I am fairly new to the functionality of QTP. I went thru the tutorial. I am able to perform various tests in our application, that is only when the behavior is as expected. How do i handle unexpected behavior. Simple Scenario: Expected: 1. url 2. enter username, password 3. Login 4. Logout If i disable to user: 1. url 2. enter username, password 3. after clicking the Login button, it routes me to a different page saying "user has been disabled" - at this point the script just hangs and there is an exception to stop, debug or skip. How do I handle this, so the script can complete as failed instead of throwing an exception. I understand the basics of checkpoints, but how to set a checkpoint to continue a certain way if the login button routes me to a different page. Please advise. Thanks, rd RE: Checkpoints - How to differential from Actual behavior to Expected Behavior - Tarik Sheth - 10-13-2009 Hi, I guess you can insert a simple checkpoint like. Browser().Page().Webelement().check(checkpoint()) which will give you a value in the boolean and then have a reporter statement like Code: If Pass then RE: Checkpoints - How to differential from Actual behavior to Expected Behavior - rdwaram - 10-13-2009 Tarik, This is stuff is very new to me. I am going to try what you started and get back to you on my progress/questions. Thanks, rd |