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.