Forum Discussion

Umea_universite's avatar
Umea_universite
Occasional Contributor
12 years ago

Using a property value in an xpath assertion

Hello!

I would like to know if it's possible to use a test suite property in an xpath assertion. I have tried this:

${//ns2:getPremisesForApplicationResponse[1]/return[1]/allSpecializations[exkod='#TestSuite#exkod']/defPoang[1]}

In this case my test suite property i KMASI, so what I want is

${//ns2:getPremisesForApplicationResponse[1]/return[1]/allSpecializations[exkod='KMASI']/defPoang[1]}

but it doesn't look like it's working. Am I doing it wrong?

Best,
Rikard
  • Cizo89's avatar
    Cizo89
    Frequent Contributor
    Hi Rikard,

    you've got it almost right, just use "${" and "}", so in your case:
    ${//ns2:getPremisesForApplicationResponse[1]/return[1]/allSpecializations[exkod='${#TestSuite#exkod}']/defPoang[1]}

    Regards,
    Marek