REST Client capture XML
I am using the REST Client that is an add-on to FireFox.
I was happily receiving XML code in a the Response Body Tab. I would capture this with QTP and send it to the global sheet.
My new issue is that a set of XML came back that is much larger than the strings that I have been working with. I think that the XML does not fit into a cell in the spreadsheet because about 75 percent of the XML string is missing. Is there a way to make an Excel cell contain more information?
Is this a limitation of QTP? I am using QTP 11.0
Is there a way to do a right click + select all. Then copy the XML into Notepad or another editor?
I used to do something similar with Adobe, copying text to a clipboard, edit to your own uses
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AcrobatSDIWindow").Activa te
'Instantiate the Clipboard object
Set cb = CreateObject("Mercury.Clipboard")
'Click into the window, press Ctrl A, then Ctrl C
With Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AcrobatSDIWindow")
.Type micCtrlDwn + "a" + micCtrlUp
.Type micCtrlDwn + "c" + micCtrlUp
Patience is like bread I say.... I ran out of that yesterday.
I finally figured out how to capture and parse the XML.
A) Use GetROGetProperty("innertext") into a variable worked better than having QTP save to a cell in a data sheet. The truncation of the string did not occur.
B) It looks like the variable is blank in the debug editor of QTP. I had to click on the place where the value should be a few times. THen the long XML string appeared.
C) The QTP XML opening method could not open the string. I tried with the MS XML editor. It complained about a semicolon. I googled the error message and it said to get rid of ampersands & in the XML. It worked.
Post Thanks / Like - 1 Thanks, 0 Likes, 0 Dislikes
Just starting to look at RESTClient...how do we get to load it with QTP?
Appreciate any help.
SystemUtil.Run "firefox.exe", ""
Let me know if you have any questions with REST Client. I may be able to answer questions.