Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to execute RunAs command in QTP?
#1
Not Solved Question 
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
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
Reply


Messages In This Thread
How to execute RunAs command in QTP? - by ashokghali - 03-03-2008, 04:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to catch the script execution when QTP scripts are executed from command line Sreeni.lutukurthy 0 3,001 03-19-2015, 05:55 PM
Last Post: Sreeni.lutukurthy
Wink How to read text in command prompt using QTP Sourabh146 1 6,651 11-30-2013, 11:02 AM
Last Post: ravi.gajul
  Clicking command button in accesss form mark_cielos24@yahoo.com 1 3,377 05-07-2013, 10:52 PM
Last Post: agarwl.anurag
Question <Interesting> Is it possible to execute SAP GUI application without QTP Jyobtech 3 3,692 09-07-2012, 12:26 PM
Last Post: SIBICA
  how to run QTP scripts from command line prompt? pra6201 1 18,410 01-03-2012, 08:46 PM
Last Post: ravi.gajul

Forum Jump:


Users browsing this thread: 3 Guest(s)