How to pass a variable in Dos Command using QTP?
Eg:
Dim path1, path2
path1 = "C:\Test\sample1.doc"
path2 = "C:\Test\sample2.doc"
How can we pass these path1 and path2 inside the "copy" dos
command?
I tried like this. this is not working.
oShell.run "cmd /K copy" &path1 &path2
Answer Posted / raghuram
Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run "cmd /K CD C: & Dir"
Set oShell = Nothing
I was able to do in this way....you can try and let me know
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
how to know no.of mails in our g mail by using vb-script
What is the script for database check point, bitmapchek point, regular expression ?
Does quicktest professional is unicode compatible?
How to handle the exceptions using the recovery scenario manager in qtp?
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
What VBScript operators, functions, and statements do you use in QuickTest Professional?
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
What is keyword view?
How to run a test using quicktest professional (qtp)?
Is QTP supports Unix. If yes, then how the test automation is done?
How is test case write?
How to call a test from another test?
What is use of object spy?
Explain the concept of object repository and how quicktest professional recognises objects?
To which environments does quicktest professional (qtp) supports?