QTP Web Extensibilty - How to Get QTP to Stop Test Execution

I am using the extension for QTP using the network extension toolkit. If my JScript function that implements the QTP action detects an error (for example, the user gave invalid argument values), I want QTP to stop the test and notify the user of the error. I want it to work like a regular error in QTP and ask if the user wants to debug \ retry \ skip \ stop execution.

How can i do this?

+3
source share
1 answer

If you selected an exception with a string, then the message you are throwing is presented in QTP, like any other script ( Stop Retry Skip Debug) error

JavaScript Error object, QTP :

throw Error("I'm sorry, Dave. I'm afraid I can't do " + action);
+1

Source: https://habr.com/ru/post/1714469/


All Articles