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 / 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 |
How can we export test results to an excel sheet in QTP??? Can any one provide sample coding for this?????
What exactly is the difference among all the three recording modes.
In VSS, HoW the documents send to local folder? copy paste or any other? plz explain about VSS TOOL kit?
how to write vbscript on web applications in qtp. explian with one example?
what are the environment variables,how do you use them. give an example.
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.
What are SetToProperty, SetRoProperty, GetToProperty scripting?
Can u call txt extension file in QTP?
Reverse string without mid or streverse function.
How can I import environment from a file on disk?
does test plan is in test strategy or test strategy is in test plan.