New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
1031 views

how to save/view the whole html response content

I am using a Web browser-driven (AJAX) project to monitor an application. When the monitor is failed, I am able to see the screenshot of the page. Is there a way that I can get the complete html response content (html source) for that page? It will be very helpful to diagnostic program using the html response content. In the truelog explorer, the tabs in the bottom right (like "Out Header", "Out Body", "In Header", "In Body" etc ) are all greyed out.

0 Likes
3 Replies
Highlighted
Cadet 1st Class
Cadet 1st Class

hi,

the tabs in truelog explorer are just enabled if there is some network traffic captured on that selected action. so if there are some "url nodes" below the eg. BrowserClick then there should be data in these tabs.

another approach: BrowserExecuteJavaScript api function allows execute some JS code (eg document.body.innerHTML) on the current displayed page, maybe that can help what you are trying to achieve...

cheers,

udo

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks for the idea! If using javascript to get html, how can I save it to somewhere so I can check it later?
0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

benchmark SilkPerformerRecorder

use "Kernel.bdh"
use "BrowserAPI.bdh"

dcluser
  user
    VUser
  transactions
    TMain : 1;

dcltrans
  transaction TMain
  var
    sInnerHtml : string;
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    BrowserNavigate("demo.borland.com");
    BrowserExecuteJavaScript("document.body.innerHTML", sInnerHtml);
    Print(sInnerHtml);
  end TMain;

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.