2

I am working on automation on IE 8 for one application. I am trying to get the second IE window which is opened from first window. But in ShellWindows I am getting only the first window. Herewith the code I am using:

InternetExplorer IE = null;
ShellWindows m_IEFoundBrowsers = new ShellWindowsClass();
foreach (InternetExplorer Browser in m_IEFoundBrowsers)
{
Logger.Log("Hi I am StatusText :" + Browser.StatusText + ", Url name : " + Browser.LocationURL + ", HWND : " + Browser.HWND);
if (Browser.HWND == IEPtr.ToInt32())
{
     IE = Browser;
     break;
}
}
if (IE == null)
          throw new Exception("Error in creating Internet explorer instance");

But it seems I am not getting the second window (Browser.HWND). I have run the same code in other system and its working fine. I was just wondering is there any IE setting which i am missing in my system.

Thanks in advance.

user958802
  • 63
  • 2
  • 7

1 Answers1

1

Does this answer help? It sounded like it was the same issue you're running into:

Active tab ignored by InternetExplorer COM object for IE 8

Community
  • 1
  • 1
James Toomey
  • 5,635
  • 3
  • 37
  • 41