03-03-2008, 04:55 PM
The AUT opens as Loggged on user. But I want to invoke the AUT as different user and run my BPT. I tried creating the below VB script but what is happening is when I run the VBS from QTP, AUT opens but QTP is recognising AUT as window object instead of Web. Any idea to get rid of this?
VBS Code
VBS Code
Code:
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:<UserName> ""c:\Program Files\Internet Explorer\IEXPLORE.EXE <AUT URL>"""
WScript.Sleep 1000
oShell.Sendkeys "<Password>"
Wscript.Quit