Answer Posted / mahi
using "Wscript.Shell" object we can work on command prompt
in qtp.
'create one instance for "wscript.Shell"
set oShell=CreateObject("Wscript.Shell")
'using run method we can invoke application
'/k this will display command prompt.we can also use /c but
we can not see command prompt.It will disappear after
executeion.
oShell.Run "cmd /k dir"
'if we want use multiple commands we can use "&"(amp) symbol
oShell.run "cmd /k dir & md qtp"
set oShell=Nothing
I hope it will useful.
Regards,
Mahi.kotike@gmail.com
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
How can you pass value one action to another action?
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
Does quicktest professional is unicode compatible?
Whats the realtime QTP testing process
Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints
What is the expert view?
How can you exit from an action?
How will you check that your test cases covered all the requirements?
What is fragmentation and paging?
Can we create user defined functions in qtp?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
What is test object model in quicktest professional (qtp)?
How to suppress warnings from the test results page?
How do you test the text displayed in the header portion of times of india epaper. Hot news(banner) are scrolling in the top of the page, how do you test using QTP?
How can i check items sorted or not in a weblist ? Give me the script for this...