cancel
Showing results for 
Search instead for 
Did you mean: 

Kill Process

BrianneGacad
Level 3
Hello All, I'm having a very weird issue wherein i do have a stage using "Utility - Environment, Kill Process" with parameter "iexplore" for process name. It's part of my exception handling wherein i kill all existing IE processes first before trying to relaunch the website and try working on the item again. It doesn't kill any process nor does it close the IE browser. Logs show it went to that action but for some reason it does not do anything and just relaunches IE. I then am left with a lot of IE browsers open and a never ending loop of it relaunching. I never experienced any of these when i was running on production laptops, but when we migrated it over to a server platform a lot of errors i never encountered just popped up and not to mention it is running extremely slow!! Any help and guidance is much appreciated Thanks! Brianne
10 REPLIES 10

John__Carter
Staff
Staff
Hi Brianne - if you look in the code stage in the Kill action you'll see it's not doing anything fancy like re-launching, all it does is try to terminate any exe with the given name. Something else must be causing the re-launches. When you say 'server platform', hopefully you don't have more than 1 user logged into the same OS?

Hey John, Thanks for the really prompt reply The relaunch is part of my exception handling, to try and relaunch target app and start process again. My main issue is within that exception handling logic, the kill IE process stage i have is not terminating any ""iexplore"" instances. Do i need to put multiple actions or loop back to the kill IE action x amount of times for it to work? And for the server platform bit, each user (I have 10 total virtual workers running) have its own OS. They use the same codes and the exact same queue which can be viewed from your web desktop (control room) Thanks for the help again!

Denis__Dennehy
Level 15
It sounds to me like your kill command is correct - and it should kill all running instances of iexplore. So i am not sure what is happening in your case. One point of note is that I would not usually recommend killing IEXPLORE in this way - because it the process often used by lots of different applications. So killing your application could also kill other applications that are running fine - this could cause issue for other people using your objects in their process if they are also using other browser apps. The only truely safe place to kill iexplore would be at the start of your process when you know no applications should be running. Have you tried a cleaner close logic where you terminate the session you are attached to using terminate in a navigate stage.

John__Carter
Staff
Staff
Kill is, as it sounds, a brutal way of closing an application. Often it's better to close down more like a user would, eg by closing the main IE window. When restarting you have to be careful not to relaunch too soon, before the previous instance has gone - some apps don't close as fast as you think. The simplest option is to pause before the relaunch, or better still, wait for the detach from the previous instance. The way to do this is to turn in a loop, checking IsConnected every second. When it returns False, go to the End. If you've waited too long and it still returns True, something is wrong.

IvanGordeyev
Level 5
Recently, I come across similar situation and I found that killing iexplore is the quickest way to deal with application issues (except for 1 error which has a retry button). Turned out to be that a Virtual Machine (VM) was running iexplore in background which could only be closed as administrator. This can be tested form command prompt - Start > Run ""cmd"" type ""tasklist"" and look for iexplore. To clarify, even if task manager in Windows does not show it as running the command prompt window will. You can test it to see if an admin permission is required by using TASKKILL /F /IM iexplore.exe /T (please note that it will close a browser, if you reading this message in ie). For me the solution was to close IE 6 times and then continuing running the process. On some occasions IE have tried to recover from being closed in such a manner, hence as the people above say, this is not necessarily a good way of closing the application, but it fits some of the circumstances.

NileshJadhav2
Level 2
Hi All, I was facing same issue 'Utility - Environment, Kill Process' not working to kill IE however i just remove "".exe"" from input parameter.(just put iexplore) Now its working fine. hope it will help you

WesGrey
Level 3
Hi, I just encountered this issue too with IE. I've experimented with a simple process on multiple machines where the only action is to kill IE. For one particular machine, ""Utility - Environment"" >> ""Kill Process"" doesn't work. I've tried ""iexplore"" and ""iexplore.exe"" as the parameter, and IE just doesn't want to shut down. But for some reason, it's working perfectly fine on my other computers that are effectively set up identically. Any suggestions here?

MikeHiggs
Level 5
I've seen this before. I always use a clean up stage (nice name for kill) at the start of my process to get rid of straddling instances. Always have a short sleep afterwards before trying to launch as iexplore can take time to actually die. ""iexplore"" not ""iexplore.exe"" in the kill action

ChethanKumar
Level 2
I have faced this issue, in my QA environment, the kill command requires administrator permissions to kill any process, the kill process command in the kill process action is surrounded by try catch and hence that will not throw you any exceptions, if you remove that exception handling in the code stage of kill process action, then you might come to know the exact issue why it's failing to kill. Give a try.. hope this will help.