Work with multiple IE instances using QTP

If your IE based application opens another window whose properties are same, it would be difficult to identify the objects in the newly opened browser.

For example consider an application, on login user is navigated to a launch page where we can launch our application in a new window. All the windows opened are having same set of properties like title, name etc.

Solution:

We can select the objects in any page based on the creation time property of the window.

Set oDesc = Description.Create
oDesc( “micclass” ).Value = “Browser”

Set sDesk=Desktop.ChildObjects(oDesc)
Set objBrowser = Browser(“creationtime:=1”)
Set App_objPage = objBrowser.Page(“title:=NAME”)

Make sure all the other IE instances are closed before our scripts starts execution.



Author: InApp
We are a custom software development company offering Testing Services, Application Development, Mobility Solutions & more. Customers: Startups - Fortune 500

Leave a Reply

nineteen + 6 =