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
What is Port testing. Whhen will you perform?
How to add synchronisation points in qtp?
Explain the concept of object repository?
Explain in brief about the quicktest professional automation object model?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?
When do go for loop condition in test?
What are the different ways to invoke an application using QTP?
What phases are involved in testing an application in qtp?
can i compare two databases using QTP ?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
How you can find the absolute value of the number in qtp?
Hi All, How to get repeated word in string . Thanks Balaji
How to test fly out menu in qtp?
X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?
Explain the difference between call to action and copy action?