Forum Discussion

electric_Insura's avatar
electric_Insura
Contributor
11 years ago

Access Datasource values in Datagen step

There is no way to access the Datasource values in a Datagen step.

Even if I copy in the context expansions from another step, any script I write with the expansions in a Datagen step returns null.

It would be very helpful to have this functionality.

1 Reply

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

    I am sorry if I misunderstood your request, but you can indeed use properties from a DataSource in a DataGen step.

    You should be able to access properties from a DataSource by just returning the expanded property from the DataGen step like so:


    return context.expand( '${Name of DataSource#Name of property}' )


    Let me know if this did not help.

    Regards,
    Anders
    SmartBear Sweden