Internet Explorer – Play Around…IE Launched using Systemutil
One strange question someone asked me is about handling IE operations using VBScript , the question was about navigating to a different URL in IE if it was launched using Systemutil and we don’t want to use QTP’s feature for recognising the window? Although it sounds a little weird that why would someone launch IE using Systemutil if further actions like going forward, going backward or retrieving information about addressbar are required to be performed on IE after its launch or even if it’s been done so, why wouldn’t we use QTP for operating some action on it. But I believe that every question gives you a space to thing differently or something that you would have never thought otherwise.
Let us first discuss the way to launch IE in case you need to perform functions like navigating to several URL, going forward, going backward or retrieving information about addressbar.The easiest way to do such things is using IE’s COM object. Following piece of code demonstrates the usage of IE com object.
Instead, if you have used Systemutil to Launch the browser it might not
be able to perform the aforesaid operations, but thanks to the technology there
is always a workaround if no solution is available, let us see how.
# Using Shell Object
If you have already a geek about QTP / VBScript you might be thinking some other way to resolve the same, there might be several other ways to do this but I would surely like to answer one of the many questions asked while discussing this issue, can’t we use GetObject function to retrieve the instance of IE and work on it.
The Answer is No, indeed. GetObject looks “Windows ROT” (a name given to phenomena of getting a program’s COM registered at the time of installation) to fetch the information of available COM objects but unlike other Programs IE doesn’t register itself in “Windows ROT”, as IE is already a part of Windows.