Forum Discussion

psprague's avatar
psprague
New Contributor
14 years ago

Property expansion from project script

Is it possible to perform a property expansion from within a project's "Load Script"? The examples I have seen all involve using context.expand(...) but there isn't a context variable available.

Thanks,
Paul

2 Replies

  • psprague's avatar
    psprague
    New Contributor

    import com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext;

    DefaultPropertyExpansionContext ctx = new DefaultPropertyExpansionContext(project);
    log.info ctx.expand('${#Project#myproperty}');
  • Hi Paul!

    I'm not quite sure what you mean with
    a project's "Load Script"?
    could you elaborate on that?

    --
    Regards

    Erik
    SmartBear Sweden