Ask a Question

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

SOLVED
kkrush
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

 

 

2 REPLIES 2
Wamboo
Community Hero

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.

sonya_m
SmartBear Alumni (Retired)

Thanks WambooSmiley Happy

 

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


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: