repost: help with IE automation management and killing processes

  • Thread starter Thread starter Richard Bell
  • Start date Start date
R

Richard Bell

I'm working on a VB application that must run 24x7 for a LONG time,
think 60 days of so. As part of what it does it must automate an
instance of IE and navigate to many different URLs, think many
thousands.

Issue 1: Most of the time, these navigations succeed. All is well.
But, based on early runs, from time to time, say once or twice every
24 hrs IE inexplicably hangs and the automation object hangs, gets
stuck, becomes nonresponsive, etc. for whatever reason. I'm not sure
why, and ultimately don't even need to know/care, but it does happen.
The application has a thread that detects this event reliably. The
question is, how can I kill the instance of IE that has become
unresponsive? I need an approach that kills, no matter what. BTW,
experience indicates that leaving hung copies of IE laying about
eventually leads to vary bad behavior by other copies of IE.

Issue 2: Some of the sites, some of the time, create a popup window.
I can detect this occurrence by catching IE.NewWindow. Testing
indicates that when there are a few popup windows displayed the main
IE window is happy to continue to work. However, when there are many,
say 10s or 100s, IE becomes very distressed, performance becomes
variable, hangs occur, etc. How can I kill these popup windows after I
catch them in NewWindow?

Issue 3: Re Issue 2. From time to time, I will need to do something
with the popup window, as in, for example, save it. When NewWindow
fires, experimentation indicates that the window is NOT complete in
that the document object is not referencable. I know how to determine
that a url is in fact fully displayed using IE.DocumentComplete. I'm
not clear on how to attach events to the popup, wait for the popup to
become complete, trigger a SAVEAS, and then kill the popup window.
Any clues?

Issue 4: I'd like to be able to do other things while this application
is running, including using IE. I know how to get a list of all the
IEs that are currently running on the system. I know the one my
application started with New Internet.Explorer. How can I tell mine
from the rest? What about when my application's IE caused some
popups? How can I know that they are a consequence of my
application's IE?

Thanks for any help.
Richard
 
Hi Richard,

You did not answer my exmanination anymore in the privious thread.

There we saw that it seems that with axwebbrowser all events are working
allmost as you and me suspect (axshdoc) and with IE (shdoc) only a few.

I did not know that before, but I advice you again to have a look at the
axwebbrowser.

Cor
 
Cor,

As I mentioned in my previous posting, that is not an available option
for this application. Additionally, in that both IE and the control
are based on the same underlying object, it makes little difference in
either case. Finally, by using the control, I would face trying to
kill the control when it hange (it does) or the application. Both
issues are rather more problematic than simpling killing an external
process.

Richard
 
Hi Richard,
Additionally, in that both IE and the control
are based on the same underlying object, it makes little difference in
either case. Finally, by using the control, I would face trying to
kill the control when it hange (it does) or the application. Both
issues are rather more problematic than simpling killing an external
process.

Look to that thread where you have made that sample, because what you write
was what I also a long time was thinking. But they are totally different.
(complete different event signature, I never used it with IE, as you
probably not did with the axwebbrowser).

Cor
 
Back
Top