I want to loop through all the running processes (get processes activity), after I got a lost of all runningen processes I want to close those wich name containes “iexplore” but when an openend window from iexplore with multiple tabs it gives an error. apparently all the opened tabs are in the list of running processes and when I’m looping through that list and kill the process wich name contains “iexplore” than I kill all those processes from those multiple tabs all in once which causes in an error, because they are still in the list.
How do I solve this issue?
Looks like you would want to get the list again and then loop through checking for any remaining iexplore processes.
You can then exit as normal once you no longer have any iexplorers to kill.
I believe you are doing something like this,
- Get list of all the Processes using ‘Get Process’ activity
- Use a for each loop to iterate through all of them.
- Add an If condition to check if the process name matches “iexplore”
- Add a ‘Kill Process’ inside if condition to kill the process if match is found.
Let me know if that’s not what you are doing.
Is it mandatory for you to get all the processes and then check for iexplore.? Did you try directly using ‘Kill Process’ activity with process name as ‘iexplore’. I believe it should not through any error even if there is no ‘iexplore’ process running. I may be wrong.
You can also try adding a ‘Break’ activity after your kill process to come out of the loop as soon as it is done. Let me know if it works.
Thank you for your answer!
indeed the kill process activity just did the job, I thought this was just for one process but indeed it kills all the webpages of iexplorer also the one with multiple opened tabs,
Great @Siene. Happy to help.