adspace


how to use command prompt using qtp?

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


Please Help Members By Posting Answers For Below Questions

Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

2559


i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com

1948


What is the new version of qtp which is recently released in the market?

1158


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

2428


Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also

2396


Can you brief the hurdles you faced during Automation testing?

1138


can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?

2166


any body can you help me what is the script to automate an comand promt

2564


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

3421


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

2079


How can you identify the browser and its information using QTP script?

1085


How are actions and functions different in QTP?

1149


How software tester can use constants and variables in scripts?

2341


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

3306


Hi All, How to get repeated word in string . Thanks Balaji

1423