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
Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you
i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click
How to creating an output value using quicktest professional?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
How to suppress warnings from the test results page?
Why is action split used by qtp?
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
How to change the priorities of the recovery scenario properties?
What is action split and the purpose of using this in qtp?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
Explain the types of properties that quick test learns while recording?
On what document base Descriptive programming is written if build is not yet ready ?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?