Micro Focus QTP (UFT) Forums
Why my ExitAction is not run - 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: Why my ExitAction is not run (/Thread-Why-my-ExitAction-is-not-run)

Pages: 1 2


Why my ExitAction is not run - rk_11 - 03-12-2010

Hi Friends,
I see ExitAction statement in my code is not working. I see during my debugging the flow is going through this "ExitAction" statement. but its not doing anything there. why does it happen.

I observed it working 1 or 2 times earlier. there is no change in the code for this. plzzzzzz help me.


RE: Why my ExitAction is not run - manishbhalshankar - 03-12-2010

Whats the error you are getting?


RE: Why my ExitAction is not run - rk_11 - 03-12-2010

i'm not getting any error. But its just running through the statement. didn't understand how can it pass through not executing it.


RE: Why my ExitAction is not run - Saket - 03-12-2010

I think you are trying in the test, if so use 'ExitTest'.


RE: Why my ExitAction is not run - rk_11 - 03-12-2010

Hi Saket,
Thanks for the reply. Exittest would exit out of the entire test. I want to only exit from action ( this is a call to exit from a re-usable action )


RE: Why my ExitAction is not run - Saket - 03-12-2010

Can you paste your lines of codes?


RE: Why my ExitAction is not run - rk_11 - 03-12-2010

Code:
If  Window("CCP").FlexApplication("Main").FlexTitleWindow("Select / Manage Community").Exist(2) Then
                notLaunched = 1
                logger "info",  "Application started in " & DateDiff("s", curTime, Now) & " seconds"
                Reporter.ReportEvent micDone, "Application", "Application started in " & DateDiff("s", curTime, Now) & " seconds"
                wait 3
                ExitAction(2)
            Else
                notLaunched = 0
                logger "info",  "CCP Failed to Launch after waiting " & DateDiff("s", curTime, Now) & " seconds"
                Reporter.ReportEvent micDone, "Application", "CCP Failed to Launch after waiting " & DateDiff("s", curTime, Now) & " seconds"
                Reporter.ReportEvent micDone, "Application", "CCP is Relaunching NOW " & DateDiff("s", curTime, Now) & " seconds"
            End If



RE: Why my ExitAction is not run - Saket - 03-12-2010

does only 'ExitAction' without argument( return value) work?


RE: Why my ExitAction is not run - rk_11 - 03-12-2010

No Saket. I tried that earlier. It didn't work ! Sad

Hi Saket,
This is fine. I'll try to figure out. Can u help me for my other query .. related to the variable scope.


RE: Why my ExitAction is not run - Saket - 03-12-2010

No this is critical. I am not able to understand why it is not working here.
it should work if you are calling this in an action.
have you tried this in a fresh action? I mean create an action put the exitAction statement there and call the action in a Test.
let me know if that works.