Quantcast
Viewing all articles
Browse latest Browse all 3527

IE11 - SHDocVw.DWebBrowserEvents2 - NewWindow3 event not fired

It seems that the Internet Explorer 11 does not trigger the NewWindow3 event anymore when the end user performs an action opening a new IE window.

I'm developing a test automation tool and this tool was so far using this event to get notified when a new window comes while recording a scenario. The code was running properly with previous IE versions (from 7 to 10). 

Here is a fragment of my browser controller class:

public abstract class AbstractBrowserController
{
  private IWebBrowserApp mm_browser;
  ...

  private void InitController()
  {
    DWebBrowserEvents2_Event wbEvents2 = mm_browser as DWebBrowserEvents2_Event;
    if (wbEvents2 != null)
    {
      RegisterOnNavigationEvents(wbEvents2);
    }
  }
  ...

  private void RegisterOnNavigationEvents(DWebBrowserEvents2_Event browser)
  {
    browser.NewWindow3 += new DWebBrowserEvents2_NewWindow3EventHandler(Callback_NewWindow3);
  }

  public void Callback_NewWindow3(ref object browserAsObject,
		          ref bool cancel,
		          uint flags,
		          string urlContext,
		          string url)
  {
    TriggerIEWindowDetection();  //Not called with IE11
  }
  ...
}

The method Callback_NewWindow3() is not called anymore.

Does anybody else have this problem?

Thanks for your help,
Claude





Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>