Cannot obtain the window with the window class 'IEFrame' ... Error! Test are Failing!
While running test, I'm getting "Cannot obtain the window with the window class 'IEFrame', window caption '*' and index 0. See Additional Information for details. 10:19:55 Normal".
I have searched in TestComplete forums and couldn't find a definitive solution. I have also checked Task Manager, there were no instances of Internet Explorer. One of the posts suggested to open several pages in Internet Explorer and checking it in the object browser to see all the pages are visible by TestComplete. I checked, and they're all visible.
Here is my code (JScript):
while (Sys.WaitBrowser("iexplore").Exists) { Sys.WaitBrowser("iexplore").Close(5000); } Browsers.Item("iexplore", "", Browsers.pX86).Run("<url>");
I'm pretty sure somebody has an effective solution for this problem. Please help!
Thanks.
Dave
P.S.: Robert, if you are reading this, I wanted you to know my error log says: "I am the terror, that FLAPS in the night. I am the script code ... " ;)
First of all, the Kudo is for the error message. :)
Second of all, your code isn't matching the error you posted. There's nothing in that bit of code that mentions an IEFrame class window so double check where the error is coming up. All it's doing is running a particular URL in IE, no mention of interacting with an IEFrame window.
Thirdly, the "Additional information" panel in the test log may contain some good info on what's going on. Could you share what you have in there?
My additional suspicion is this (as I'm running into something funky myself) in that, when you close the browser using the "Close" command, sometimes an instance of IE remains memory resident for which the call to "Close" doesn't actually work. So, in my test cases, after a test case completes, I call the "close" command... and then, before I proceed to the NEXT test case, I call the following code:
browser = Sys.WaitProcess('iexplore', 1000); while((browser.Exists)){ browser.Terminate(); browser = Sys.WaitProcess('iexplore', 1000); }
This will actually terminate the specific process since there isn't an actual Window to close any more. See if this helps.