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 a quick test professional?
what QTP Options do you know?
How to analyzing test results using quicktest professional (qtp)?
What are advantages of test automation?
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 to convert 100 into hundred repees only and viceversa
What is parameter in qtp?
Can any give an example(if possible templates) how to test web application using QTP. thanks in advance
What is synchronization? What are the ways you can synchronize?
What is the extension of qtp local repository?
Is it possible to merge two object repository files in qtp?
hou can we use vb script in qtp could u tell me breafly
How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")
Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations
How to call a test from another test?