Micro Focus QTP (UFT) Forums
2 process opened for ie help - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: 2 process opened for ie help (/Thread-2-process-opened-for-ie-help)



2 process opened for ie help - priya999 - 02-13-2011

hi i am trying to close all opened internet explorer using task manager

i have used for loop to close all the error by getting the number of ie opened
but its only perform this operation for oneiteration and from 2nd itearation it throws the folln error

"not found "





RE: 2 process opened for ie help - jsknight1969 - 02-16-2011

I can see a few issues here and some common mistakes. Without seeing your code its hard to say exactly. Common mistakes are to not start with "0" in the loop. Vbscript arrays are zero based. Maybe all the processes ended, but you are still trying to process one. use "On error goto 0" to override VBscripts stop on line with error and then handle the event manually.

If nothing works, post more of your code.

Hope this helps.




RE: 2 process opened for ie help - priya999 - 02-22-2011

thank u i will try again and will post the code here







RE: 2 process opened for ie help - basanth27 - 02-23-2011

Why are you looping through task manager? Any specific purpose?
If my req is simply to close all open IE then i would use
Systemutil.closeprocessbyname "iexplore.exe"


RE: 2 process opened for ie help - priya999 - 02-25-2011

ha ha that was simple solution
from now i will try to keep my scirpt simple
but i have doudt that

when i trying to close the ie process from the task manager
first issue
i can see that there are 2 process for each ie opened

second issue
no matter how many ie are opened qtp closes them all in first iteration

thats is the reason for the second loop it gives "not found" error








RE: 2 process opened for ie help - basanth27 - 02-25-2011

2 Process for each IE - Restart the machine and try again. It never happens that way.

no matter how many ie are opened qtp closes them all in first iteration
thats is the reason for the second loop it gives "not found" error - Restart should resolve the issue if you are using the right code. However, would you mind pasting the code?