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
Is qtp supports uni-code?
Hoe can we do retesting using functions please give the code for it using login page
What phases are involved in testing an application in qtp?
What is the Command used to start the QTP
How to execute a winrunner script in quicktest professional?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
How can you give wait up to 10 seconds in qtp?
There is an excel file of 1 to 100 sheets how you will iterate through it?
Define Error Pane of UFT?
what is run-time data?
how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods
For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?
Explain the concept of how quicktest professional (qtp) identifies object?
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
How to export quicktest professional (qtp) results to an .xls file?