Proper Way to close an application

jpcrepeau

Member
Hi,

I was wondering if there is a clean way to close applications such as IE and Outlook. I can close Excel using the VBO and I don't like the idea of killing a process to close an app...I feel like that could lead to problems.

How do you guys close Outlook and IE for example?

thanks for the help!
 

VJR

Well-Known Member
Hi jpcrepeau,

It is right that kill process is not a ideal way of closing applications.
Closing an application will depend on how the application is opened too.
For eg; if an IE window is opened via the 'Launch' action of the root element of an Object, then it can be closed via the 'Terminate' action available in the same list of actions in the Navigate stage.

But if the IE is opened via calling the exe in the Start Process then Kill Process will have to be used OR the IE window will have to be Attached to an Object and then use the first approach of Terminate action. But the later option will require to have an Application Modeller which will not always be the case. For eg; If someone is designing a process that does not require any spying of elements so there will be no Application Modeller involved and wants to start an exe (using Start Process) in which case will have to only use the Kill Process.

Even applications like Outlook (or Notepad) also have the Terminate action in the Navigate stage.

There is also another approach where the outside border of the window can be spied in Win32 mode and this then gives the 'Close' action in the Navigate stage (along with the other window operations like Maximise, Minimise, Move, Resize) which mimics the action that we manually do while closing a window using the Close button on the top right corner.
 

jpcrepeau

Member
Thank you! That’s what I thought. I didn’t think of creating a vbo to launch and terminate outlook. Thanks for the inspiration!
 
Top