Forum Discussion

FrankP's avatar
FrankP
Occasional Contributor
7 years ago

Unable to Transfer property from response to testcase level property

I want to transfer a property from an existing Response to a property named 'BenchmarkId' defined at the TestCase level. This gives an error 'Unexpected element CDATA'. See attachment.

 

I'm also wondering why after selecting a testcase property as the target property for a transfer it's still possible to select a Path language on the target side.

  • Thank you so far. I changed the select language to JSonPath and it's working fine now.

     

    I found out that selecting ResponseAsXml for the source property also works fine.

  • Lucian's avatar
    Lucian
    Community Hero

    I get your point but yeah... this is what we have :smileyvery-happy:

     

    Now as for your problem I'm not sure but it does work for me.

     

     

    Maybe you can send me the SoapUI project so I can help you?

    • FrankP's avatar
      FrankP
      Occasional Contributor

      What in your reply attracts my attention is that the Icon to select a node from the respons is enabled in your case (at least is partly green). In my case this possibility is disabled so I had to write this XPath expression myself. I doubt if this has something to do with my problem. It's not possible for me to send you the rest project becaus it's an internal project.

       

      By the way, the same option to select from the response works fine for assertions.

      • Lucian's avatar
        Lucian
        Community Hero

        Well it's quite hard for me to help you otherwise :catsad: btw it looks like you're using a quite older version. Could it be a bug in there?

  • Lucian's avatar
    Lucian
    Community Hero

    Hey,

     

    Usually when I get this kind of errors there is some data missing. Could you provide the response of the 'Get Benchmarks by SurbeyId' step?

     

    Regarding the other question... You also have a path language and an empty field beneath because (as far as I know) you can pass property values directly into a request if - let's say - you have some variable in there or something.

    • FrankP's avatar
      FrankP
      Occasional Contributor

      This is the response:

       

      <Response>
      <e>
      <id>9090</id>
      <benchmarkId>1</benchmarkId>
      <calculationId>146</calculationId>
      <showTop3>false</showTop3>
      <order>0</order>
      <name>Benchmark Nederland</name>
      <groupName>Commonly used benchmarks</groupName>
      <calculationName>Calculation #146</calculationName>
      <calculatedOn>2018-02-28T00:00:00+00:00</calculatedOn>
      </e>
      </Response>

       

       

      I know that you can pass property values direct into a request but I would expect the posibilities of defining an Xpath etc. to be disabled after selecting a Custom property as target.