Forum Discussion

Deepu's avatar
17 years ago

Capture a value from the response

I am getting the following reponse


 
     
        12
     

 


I want to capture the value 12 to validate the repsonse. Please let me know how to do it .

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    add an XPath assertion with the xpath-expression

    declare namespace ns='http://www.webserviceX.NET/';
    //ConvertTempResult/text()

    and set the expected value to

    12

    Hope this helps!

    regards,

    /Ole
    eviware.com
  • ahsu's avatar
    ahsu
    Occasional Contributor
    Hi,

    I am new to this SOAP UI tool. I had a question regarding the correlation.
    In this post they want to validate a value (12). That is fine.

    But if i want to capture a dynamic value from the response then how should i proceed in this aspect.

    For ex if i am searching a book (for java) in the website. I will get the details of that book. But if i want to search a 'C' book the details will differ (like author, book name, publicaiton etc). Depending on the user input value the page is differing.

    So now please tell me how can i capture the author, bookname, publication such that for the respective input i should get the relevant page of that input.

    Please do the needful.
    Thanks in advance.

    Thanks
    ahsu