Slimy37
15 years agoOccasional Contributor
responseAsXml not being returned
I have a web test case that interrogates a series of web pages, passing parameters from one to the next using Groovyscript. The first page works, and returns a 'responseAsXml', which is then parsed with Groovy to get the next set of values. These values work for the second page, and I have a copy of the same Groovy to parse those values and pass them to the third page.
Unfortunately, while the first page (a HTTP GET) returns a 'response' as well as a 'responseAsXml', the second page (a HTTP POST) only returns a 'response'. The response can be viewed as XML, and is almost identical to the first page in form and content.
Is there any reason why the first page returns an xml response but the second doesn't? Is it because the first page is a GET response, whereas the second is a POST response?
Alternatively, this is what I'm using to get the parameters out of the web pages;
viewstatetemp=context.expand( '${Step 2#ResponseAsXml#//div[@id="pagecontent"]/form/input[@name="__VIEWSTATE1"]}' );
What would be it's equivalent using just response? I did try the obvious, but just removing the 'AsXml' bit didn't work. I'm guessing because the 'response' part isn't XML the whole XQuery string doesn't work.
I'm using soapUI 3.6.1 standard.
Unfortunately, while the first page (a HTTP GET) returns a 'response' as well as a 'responseAsXml', the second page (a HTTP POST) only returns a 'response'. The response can be viewed as XML, and is almost identical to the first page in form and content.
Is there any reason why the first page returns an xml response but the second doesn't? Is it because the first page is a GET response, whereas the second is a POST response?
Alternatively, this is what I'm using to get the parameters out of the web pages;
viewstatetemp=context.expand( '${Step 2#ResponseAsXml#//div[@id="pagecontent"]/form/input[@name="__VIEWSTATE1"]}' );
What would be it's equivalent using just response? I did try the obvious, but just removing the 'AsXml' bit didn't work. I'm guessing because the 'response' part isn't XML the whole XQuery string doesn't work.
I'm using soapUI 3.6.1 standard.