Forum Discussion

sboris's avatar
sboris
Occasional Contributor
3 years ago
Solved

An attempt to set a property value of Integer data type throws an error

I'm trying to set an integer value for a property (groovy script in a test case and on a setup tab of the test case): def count = 0 testRunner.testCase.setPropertyValue( "loops", count ); and get...
  • nmrao's avatar
    3 years ago

    It can hold only string value.

    So, cast it to string while storing into property and parse it to integer when you get the value back and use it.

     

    testRunner.testCase.setPropertyValue( "loops", count.toString())