IE COM Automation - Events

Started by JTaylor, September 15, 2015, 08:22:25 AM

Previous topic - Next topic

JTaylor

I think I know the answer but hoping I am wrong....

Is there a way to intercept events when automating IE (not the webbrowser control)?  I am launching the instance of IE and have the object and can access properties and methods but have a need to access events.

Thanks.

Jim

JTaylor

...my main need is to stop pages from opening in new instances of IE.  If there is another way to default to the current instance that would be fine as well.   Currently I am replacing all "target" directives with "_self" but that doesn't keep someone from clicking a link before the replacement occurs.

Jim

stanl

are you referring to the before navigate, because as we both know that doesn't stop links, but I thought after IE 9 there were a set of properties to only open as a new tab in the existing instance.

JTaylor

There is an event that tells me when a New Window is being created which gives me the new URL and allows me to stop the event from occurring.  This allows me to navigate to the new URL in the current instance.   

I need everything in the one window.   No Tabs.   I am reasonably certain there is no way to make this happen with the IE configuration in IE11.

Jim

stanl

Quote from: JTaylor on September 15, 2015, 09:50:41 AM
I need everything in the one window.   No Tabs.  Jim

I guess I got confused. You are saying 1 instance of ie11, and that acts as 1 window and every navigation is populated to that window/instance, and no tabs. What about a kiosk view, or is that me just getting more confused.

JTaylor

It is a situation where the ideal thing would be to have an embedded browser but that is not working in this situation due, partly, to speed but mainly because it doesn't seem to handle "busy" sites very well.   Those with LOTS of ads, videos, javascript, etc.   But the job requires the ability to control the browser very tightly.   It is a kiosk type of scenario but with a custom menu and backend that does many things based on the current URL.   Not allowed to go into much detail but hopefully this makes some sense.

Jim