Forum Discussion
AlexeyKolosov
14 years agoStaff
Hi Mark,
In TestComplete, you need to modify your keyword test so it calls the ProcessCommandLine script routine. You can modify the script in the following way:
Sub ProcessCommandLine
index = 0
For i = 1 To BuiltIn.ParamCount
index = ProcessCommandLineArgument(BuiltIn.ParamStr(i), index)
Next
End Sub
Function ProcessCommandLineArgument(arg, index)
Dim items
items = Split(arg, "=")
If UBound(items) = 1 Then
Project.Variables.VariableByName(Project.Variables.GetVariableName(index)) = aqString.Trim(items(1))
index = index + 1
End If
ProcessCommandLineArgument = index
End Function
Note that you need to have three (the number of passed parameters) project variables to run the script.
Then, you will be able to retrieve the passed parameters' values by using project variables.
Related Content
- 7 years ago
Recent Discussions
- 4 hours ago