VBScript - 1 . Launching QTP
VBScript - 2 . Connecting to QC/Open QC test
VBScript - 3. Add Resources of the Script
Here we shall look how to intialize the test parameters.
Dim ParamName,i
Create parameter definition object
Set rtParams = appQTP.Test.ParameterDefinitions.GetParameters()
wscript.echo "Assigning Parameter Started "
ParamName = "Test1"
wscript.echo "Parameter " & ParamName
rtParams.Item(ParamName).Value = "ABCD"
wscript.echo "Parameter " & ParamName & " = " & rtParams.Item(ParamName).Value
Set rtParams = appQTP.Test.ParameterDefinitions.GetParameters()
wscript.echo "Assigning Parameter Started "
ParamName = "Test1"
wscript.echo "Parameter " & ParamName
rtParams.Item(ParamName).Value = "ABCD"
wscript.echo "Parameter " & ParamName & " = " & rtParams.Item(ParamName).Value
ParamName = "Test2"
wscript.echo "Parameter " & ParamName
rtParams.Item(ParamName).Value = "DEFG"
wscript.echo "Parameter " & ParamName
rtParams.Item(ParamName).Value = "DEFG"
wscript.echo "Parameter " & ParamName & " = " & rtParams.Item(ParamName).Value
wscript.echo "Assigning Parameter Ended "
When i try to use the parameters in the script, the value of the parameters became ""
ReplyDelete