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

Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19

1171


What is active screen?

556


Explain the features of quick test pro(qtp)?

560


What are the Test design techniques you uses in ur project?

1476


What are the advantages of Object Repository?

575






Suppose I want fail that check point? How can you do that?

592


Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

1596


I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance

1700


What is system testing and what are the different types of tests you perform in system testing?

589


What do you mean by checkpoints in qtp?

550


I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?

1665


What is the difference in testing a client-server application and a web application?

572


Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)

1440


Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!

2434


What is the extension of qtp local repository?

565