Forum Discussion

corki's avatar
corki
Contributor
16 years ago

HOW TO REMOVE test PROPERTIES via groovy script

Hi All,

  I cant find out how to use something like this: (to remove all properties on testCase level)


  for(prp in testCase.getPropertyList()) {
 
            testCase.removeTestProperty( prp );

  }


---> except this  get PropertyList() function does not work too, and it has declaration in SOAP API 2.5.1 that I use. Can someone help me. Very greatfull.

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,



    for( prop in context.testCase.properties) {
      context.testCase.removeProperty( prop.value.name )
      }



    Hope this helps, let me know,

    robert
  • Thank you.

        My fault was, that I tried to put the Object of property to remove function.

                  so correct way :      testCase.removeProperty( property_name );

      thank you .