Internet Explorer problem when Terminate

Hello,
I having a problem when terminating an automation in IE11, i launched the iexplore.exe file, do all what i need to do but when i close IE with the terminate option from blue prism, the window is closed BUT, in the task manager there is always an iexplore.exe *32 running at the end, it never ends this process. So at the end there are multiple iexplore.exe *32 using RAM non stop.
I tried launching the iexplorer version 32 bits but got the same results after terminating it.

Thanks for all your help.
Andres
 

VJR

Well-Known Member
Hi arodriguezm,

What you are seeing is perfectly normal and expectable. It is part of the design by IE which does several things to itself when we open, switch tabs, close, tab crash, tab isolation etc.
I see 5 "iexplore.exe *32" instances running in my Task Manager and most importantly even before running any IE process via Blue Prism.
The main thing I noticed is that when an IE instance is opened via Blue Prism, an "iexplore" entry is visibly added to the Task Manager and goes away when the Terminate stage is stepped through. So the job of opening and closing an IE instance via BP is done and it should be fine.
 

cs.andras

Active Member
All right, let me explain this, it might not make sense how IE works. In 64bit environment - judging from the *32 - IE opens one 64bit process which handles the main window. Within that IE opens the tabs which are handled by several independent 32bit processes. As a result, if a tab fails and needs to restart, others are not affected - or at least that was Microsoft's intent. :)
You might be randomly closing just a tab, not the main process - which would kill both IE itself and the tabs. (By the way this is since IE7 - tabbed browsing was introduced.)
From this comes need necessity to make a loop with a switch that determines if the iexplore process is still running, if so, attempt kill it again. If not, the process kill is completed.
Do not worry about getting stuck in a loop, after killing a tab, IE tries to restore it only every few seconds. BP is much faster in killing processes than that.
 
Hi, i just did the process to kill a process, now a question regarding blue prism and application modeler, is it better to use the kill process than terminate to close a IE window? Im im sure im only opening one IE window at a time
 

cs.andras

Active Member
Hi, i just did the process to kill a process, now a question regarding blue prism and application modeler, is it better to use the kill process than terminate to close a IE window? Im im sure im only opening one IE window at a time
Killing a process and terminating the app is virtually the same. Closing the window is not, especially with IE. IE tends to keep stuff in memory for quicker startup the next time. You could call it application caching. I'm not quite sure though that if you close the window that you've opened through BP that it wouldn't be completely closed in the background as well.
 

chm

New Member
In my case after closing last window of IE all processes are gone.

However I have created a code stage in c# which kills all iexplore.exe processes just in case I might be needing it.

C#:
foreach (var process in Process.GetProcessesByName("iexplore"))
{
    process.Kill();
}

while(Process.GetProcessesByName("iexplore").Length > 0){
System.Threading.Thread.Sleep(500);
}

This one will wait until it kills all of them. You might want to modify it so it doesn't wait forever in case something goes wrong.

Remember about adding proper namespaces.
I think Process is in System.Diagnostics but you double check it as I don't remember now.
 
Top