| || |
Unable to stop running QTP Script in QTP 10
Im having major problems in Stopping a QTP Run session in QTP 10.
I used the following code
Set qtApp1 = createObject("QuickTest.Application") ' Create the Application object
If qtApp1.GetStatus <> "Not launched" Then
Set qtTest1 = qtApp1.Test
If (qtTest1.IsRunning) Then
qtTest1.Stop ' Stop the test
wait 5 ' wait 5 seconds
qtTest1.Close ' Close the test
On trying to close a running script, a RUN ERROR Failed to stop the test run is got..
Does any one know any other way to do a Stop Run?
Re: Unable to stop running QTP Script in QTP 10
You cannot close the script as it is already running and a script can only be closed when the script has completely stopped. And when it has stopped you can't execute the code to close it also