ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
how to use command prompt using qtp?
 Question Submitted By :: Venky
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to use command prompt using qtp?
Answer
# 1
Set =createobject("wscipt.shell")
a.run "cmd /K CD C:\ & Dir"
 
Is This Answer Correct ?    0 Yes 0 No
King
 
  Re: how to use command prompt using qtp?
Answer
# 2
Hi King,

Thanks 4 the ans.

I want have still more clarification abt this. suppose I 
want to know list all excel sheet present in some folder 
using console. how can i do that?
 
Is This Answer Correct ?    0 Yes 0 No
Bathi
 
 
 
  Re: how to use command prompt using qtp?
Answer
# 3
hi ,
u can open command prompt using following script also



dim app
set app=createobject("QuickTest.application")
SystemUtil.run "cmd.exe"
 
Is This Answer Correct ?    3 Yes 1 No
R.prasad
 
  Re: how to use command prompt using qtp?
Answer
# 4
Hi Bathi,

dim app
set app=createobject("QuickTest.application")
SystemUtil.run "cmd.exe" 'the command prompt open
app.sendkeys "cd\"
app.sendkeys "~"
app.sendkeys "cd Foldername"
app.sendkeys "~"
app.sendkeys "dir *.xls"
app.sendkeys "~"

i think this is working properly accoring to my knowledge.
 
Is This Answer Correct ?    0 Yes 0 No
King
 
  Re: how to use command prompt using qtp?
Answer
# 5
Hi King

app.sendkeys showing error..
 
Is This Answer Correct ?    0 Yes 1 No
Ravi_kanakam
 
  Re: how to use command prompt using qtp?
Answer
# 6
hi frnds in the above answer(by king) there is only one 
change

as inspite of creating object of quicktest.applicaton 
you should create object of wscript.shell
The code is as::

Set app=CreateObject("Wscript.shell")
SystemUtil.run("cmd.exe")
app.sendkeys "cd\"
app.sendkeys "~"           'its for enter key
app.sendkeys "default.xls" 'this xls should be any where 
your c drive

app.sendkeys "~"



Please correct me if i am wrong any where
my emai id is 
kaul.shobhit@gmail.com
 
Is This Answer Correct ?    4 Yes 0 No
Shobhit Kaul
 
  Re: how to use command prompt using qtp?
Answer
# 7
To know ALL .XLS FILES in the folder. Please use file 
system object. 

Create file system object.

Check using fileExists method. 

You can also make array of .xls file and return the array.
 
Is This Answer Correct ?    0 Yes 0 No
Sandeep
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
What is the use of "Define new test object" in QTP 9.1 When should we use? Explain?  4
In a Web appl, on a page, there are student names & details listed.On clicking sort button,details are sorted on Names.How do u verify htat sorting is done by using QTP? IBM1
Suppose u write test case in Excel sheet . how u open that test case in Test Director? Ordain-Solutions3
What is BPT?  2
What exactly is the difference among all the three recording modes. Accenture5
Is it possible to run QTP scripts created in IE 6.0 in IE 7.0? TCS4
How function returns a value?  1
what is virtual object?  2
I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded? Syntel4
What is runtime objects and test objects? What is the difference between them? IBM4
What are software testing metrics  3
in process of project exaplnation the defects are says frequently r not?  1
Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why? Accenture3
Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.  2
How can i find out any "text's" coordinates in excel sheet For example: I want to know the coordinates of "F" Column in the excell sheet While recording when i clicked on F column it is showing the coordinate values 385,9 but with out recording how can i find out them Suppose i want to clik on "H" column writing the script like this Window("Book1").WinObject("Book1").Click (...........) Here I Dont know what (x y )values should i enter Please any one can help me? Livetek1
what is smart identification in qtp? pls any give details? thanks in advance IBM3
how i can get the value of label box , please any body tell me script of that code  1
diff between winrunner and qtp Wipro1
what is the syntax for regular expression in QTP? how to create user defined functions in QTP? MBT4
How did u write macros?What is the main importance of VB macros in testing environment?  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com