Search code examples
qtp

Why does QTP need to be told twice to Stop?


In QuickTest Pro 10, I've noticed that whenever I have a Stop command in a function, QTP will ignore it. However, if I have a second Stop after the first command, QTP will stop on the second command. Why is this?

For example, let's say I have this in a function:

If True Then
    Stop
End If

...won't stop. However...

If True Then
    Stop
    Stop
End If

...will stop. Why?


Solution

  • Could it be the facts described in http://support.microsoft.com/kb/252895/en-us are responsible for the symptom?

    I don't think, however, that it is a good idea to use Stop in QTP scripts, since QTP is one of the few using the VBScript engine to implement its own IDE, and there are various integration issues between the debugger and the engine.

    So I would not expect all VBS IDE features (and Stop is one of them) to be supported by QTP.