Forum Discussion

Jacob_Hassing's avatar
Jacob_Hassing
Contributor
15 years ago

set delay time dynamically

hi i am trying to set delay time dynamically from groovy script.
in sample project i added a groovy script with only this line :

testRunner.testCase.testSteps["Delay"].delay =9000

then added a delay step named "Delay"
script runs without problems, but delay is only the default 1000 millisecs

shouldn't that work ?

another question
can i in delay step use property expansion instead ?

3 Replies

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

    we'll check on this. But if you use property expansion it should work. For example if you have test case property delayTime
    in delay step instead entering number you could put ${=testCase.properties["delayTime"].value}, for example. And for
    delayTime value put some value.

    Hope this helps, let me know

    robert
  • ok property expansion is much easier and worked fine for me.
    so dont bother about the groovy thing then, for my sake
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    this should anyhow be working in the upcoming nightly build, thanks for pointing it out!

    regards,

    /Ole
    eviware.com