cancel
Showing results for 
Search instead for 
Did you mean: 

When an error happens, how to call the logout scripts.

SOLVED
Highlighted
Occasional Contributor

When an error happens, how to call the logout scripts.

Hello, 

 

I would like to know when error happens during execution , I would like to call the "Logout & Close Browser" script immediately, how to call it.?

so in Test -1 , lets say if keyword action 2 fails for some reason, I would like to call the "logout script & Close Browser" immediately and then the control should move to Test -2., how can I do it.?

for example:

Test -1

--- Login

--- keyword action 1

--- keyword action 2

--- script action 3

--- Logout

--- close browser

 

Test - 2

--- Login

--- keyword action 5

--- keyword action 6

--- script action 1

--- script action 2

--- Logout.

--- close browser

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: When an error happens, how to call the logout scripts.

Hi,

 

In my opinion, You can Use TestComplete events, like this one:

 

https://support.smartbear.com/testcomplete/docs/reference/events/index.html

 

Try to write a script for 'OnLogError' event.

View solution in original post

2 REPLIES 2
Highlighted
Community Leader

Re: When an error happens, how to call the logout scripts.

Hi,

 

In my opinion, You can Use TestComplete events, like this one:

 

https://support.smartbear.com/testcomplete/docs/reference/events/index.html

 

Try to write a script for 'OnLogError' event.

View solution in original post

Highlighted
Community Manager

Re: When an error happens, how to call the logout scripts.

Thanks WambooSmiley Happy

 

Hi @kkrush , did you try following the suggestion? Please share.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors