Close all instances of IE if error is thrown

Hey

Does anyone know how I would close all instances of IE if an error is thrown? I currently have a process where if any exception is thrown it is caught in a try catch and logged and the process then goes to get the next item from a queue.

I would like to made sure all instances of IE are closed before it goes to get the next item as have multiple screens open can mess with the bot while running. I tried ‘Close Application’ activity but i seen to need to indicate a particular screen with this. The problem I can have any number of screens open and the bot maybe working on any screen when an exception is thrown

Any ideas?

Hi,

image

Try using ‘Kill Process’ activity to kill IE before going to next item.

@Cormac
Have a Look Here
KillAllProcesses give me an exception - #15 by ppr

Here you will find a demo xaml ready to kill processes in a dynamic way

Hey,

Have you tried to provide “iexplore” in the Kill Process processName ?

1 Like

Thanks @Damien. That explained it all

1 Like

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