Micro Focus QTP (UFT) Forums

Full Version: Want to open a new browser window with new session
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[/b]I want to work with multiple application users during a run session of QTP
say user A and user B

I am using below code to creat another IE window and login as user B. below is my code

Code:
set objexpl = CreateObject("InternetExplorer.Application")
    objexpl.visible = true
    objexpl.navigate "https://projectcentre.net/QTP"

Problem with this code is that it opens a new broswer window but rather opening home page to login it carries the existing user session i.e. user A session and takes to first page directly without login.

if I use other ways like
'SystemUtil.Run "iexplore.exe", "https://projectcentre.net/QTP"
it takes me to login page but problem is I can't get the browser object this way, So that I can manipulate different object on login page using descriptive programming

Waiting for your help as its little urgent for me
dynamically get the browser objects.
Code:
Set objB= Description.Create()  
                objB("application version").Value ="{BrowserVersion}"

        Set p_objBC = DeskTop.ChildObjects(objB)  
                intB= objBC.Count
' Get the number of IE browsers opened on Desktop and loop through them to get your handle for the new browser window.