Closing Browser if Automation Fails

Hello All,

I have scheduled tests to run throughout the week through Orchestrator unattended. However, if 1 of these runs fail it leaves that instance of Chrome open, then when the next test runs it fails due to having another Chrome tab open.

My question is, if one of my automations fail how to I close that Chrome instance. I saw some posts about using Kill Process but I’m unsure of how I would implement.

1 Like

Hi @egillfisher

Before catching the exception in the catch block add kill process activity. And in that gave process name as “chrome”

@egillfisher

As A best practice before start of any process and also at the end of every process we would include kill process activity for all applications that are being used so that the environment is as expected…

You just need to provide name of application in process name field and it would kill .for example provide "chrome" to kill the chrome application

Cheers

1 Like

Put like this in kill process activity

image

image

**keep it in the beginning of your workflow
So that in previous run if any failure occurs and chrome is left opened, then during next run bot will first close the browser and then only proceed further with the current run **

Hope this helps

Cheers @egillfisher

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.