Trying to capture xml returned from POST

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ibatey
Newbie
Posts: 10
Joined: Thu Dec 17, 2015 9:24 pm

Trying to capture xml returned from POST

Post by ibatey » Wed Jun 13, 2018 8:11 pm

Hi
I have a script which reads an Excel File and enters the details into a webservice Form, which makes a Post Request to a Webservice. This works fine and I get a second IE window opening up with the Webservice Reply. (as per attached picture)
xmlReturned.png
I've not been able to find a way to use the Tags capability to capture this data... I only actually want the <Error> </Error> line
Anybody got any ideas about what I might need to do with this?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Trying to capture xml returned from POST

Post by Marcus Tettmar » Fri Jun 15, 2018 10:27 pm

Capture the entire source using IEGetAllText or similar and then use the XMLParse function.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ibatey
Newbie
Posts: 10
Joined: Thu Dec 17, 2015 9:24 pm

Re: Trying to capture xml returned from POST

Post by ibatey » Sun Jun 17, 2018 2:23 pm

Hmmm... I tried that before I posted, and the IEGetAllText didn't seem to work either. That was what I'd first supposed. I was also sure I had the right screen/instance of IE, but I'll have another try when I get some free time in case I made some error.

In the end, I got round it by calling the webmethod directly using httpRequest, which avoids the form filling and the text ends up in the httpRequest return variable. (Luckily I was able to get the POST details for the webrequest to allow me to do this.)


Thanks for your help.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts