Forum Discussion

newbear's avatar
12 years ago

How to reference property value 2 or 3

I have a test case property setup with one name that has multiple values. For example name: Type with Value: typeA|typeB|typeC where | is the delimiter. In the test step I have a soap request that uses the property name value pair. Like:
<typ:StatusRequest>
<typ:Type>${Properties: Type Address#Type}</typ:Type>
<typ:Address>${Properties: Type Address#Address}</typ:Address>
</typ:StatusRequest>

The request works but it only uses the 1st value in the property (I always get typeA). How do I reference the other values for that property (like typeB or typeC)?
I tried:
typ:Type>${Properties: Type Address#Type[2]}</typ:Type>
or
typ:Type>${Properties: Type Address#Type2}</typ:Type>

But these did not work.

1 Reply

  • SiKing's avatar
    SiKing
    Community Expert
    I think you misunderstood how properties work. Each property is able to hold only one value at a time.

    newbear wrote:
    The request works but it only uses the 1st value in the property (I always get typeA).

    I do not understand how this is possible: you should have gotten "typeA|typeB|typeC" substituted as the whole thing, unless you are doing something else that you did not describe here.

    What you are trying to describe would have to be done with a Groovy script.