We are trying to automate a functionality test of a web app that we manage. The app starts with a splash page that has an "accept" button on it. Clicking the accept button launches a new IE window with the next page of the app and attempts to close the existing IE window.
To do this, we're using an InternetExplorer.Application COM object.
We've figured out how to do everything we need on the initial splash page, and we can utilize the next page just fine when we open it directly in the script.
The problems have come up when we attempt to test the functionality of that "Accept" button.
1) IE is throwing the popup box saying that the webpage is trying to close the window. Try as we might, we cannot figure out how to respond "Yes" to that prompt. (I've tried various derivations of SendKeys with no success, but it's possible I just
wasn't using it appropriately.)
2) After manually clicking "Yes", the new window loads, but we can no longer control it with the existing COM object. This makes sense, since the existing COM object was associated with the IE window that just closed, but is there any way to "Get" or "Capture" the new IE window as an existing COM object so that we can just continue working with it?
Thanks in advance!