Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
17 years ago

Clearing properties from properties step

How can a delete all items from a properties steps via groovy.

is there something like

def props = testRunner.testCase.getTestStepByName('Results');
props.clear()

thanks

Ali

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    sure.. try

    props.clearPropertyValues()

    regards,

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    This only seems to clear the 'values' of the 'names'.
    How do I delete all the name/values from a properties step.

    Thanks

    Ali
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    Sorry, there is no single method, but maybe you can do something like

    for( name in props.propertyNames )
        props.removeProperty( name )

    ?

    regards,

    /Ole
    eviware.com