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
Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?
What are the key points to create a framework in QTP for oracle forms?
what is the diff between manual test plan document and automation test plan doc.can u explain indetail.
Can launch two instances of qtp on the same machine?
How software tester can use constants and variables in scripts?
In qtp, how you can get the last character from a string?
What VBScript operators, functions, and statements do you use in QuickTest Professional?
how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?
How did you resolve conflicts present in Object Repository?
If I give some thousand tests to execute in two days what do you do?
In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!
What is the Difference between test object and run time object?
What are the ways you can synchronize?
Can we use index on view?
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