Forum Discussion
Finan
14 years agoFrequent Contributor
First example:
switch
to
In your example, you were counting the testCase properties, i.e. the properties on the testCase level, instead of the properties on testStep level.
Second example:
If you want to set the value of the property "randomValue" (from testStep "properties") to a random value, you should do the following:
switch
testRunner.testCase.getPropertyCount()
to
testRunner.testCase.testSteps["properties"].getPropertyCount()
In your example, you were counting the testCase properties, i.e. the properties on the testCase level, instead of the properties on testStep level.
Second example:
If you want to set the value of the property "randomValue" (from testStep "properties") to a random value, you should do the following:
testRunner.testCase.testSteps["Properties"].setPropertyValue("randomValue", (100000000 + (int)(Math.random()*900000000)).toString());