How to get http request logs

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

How to get http request logs

Post by bheemuabhigna » Mon Sep 05, 2011 9:02 am

Is it possible to get all httprequests of a browser

Eg: we have opened the browser, navigated to, searched for a string, clicked on any link and I got some error
Now I want to track all httprequests from opening browser
We have been using fiddler, but our client wants this to be done by ranorex (so that when particular testcase fails it can send all session details also)

I have tried below with no success
public void httprequests()

string _url = repo.WebDocumentEzprints_ecommerce.Self.PageUrl.ToLower();
Uri _uri = new Uri(_url);
HttpWebRequest lWebRequest = (HttpWebRequest) WebRequest.Create(_uri);
HttpWebResponse lWebResponse = (HttpWebResponse)
//StreamReader lResponseStream = new StreamReader();
Encoding encode = Encoding.GetEncoding("utf-8");
Stream receiveStream = lWebResponse.GetResponseStream();
//StreamReader reasstream = new StreamReader(receiveStream,encode);
StreamReader readStream = new StreamReader( receiveStream, encode );
Console.WriteLine("\r\nResponse stream received.");
Char[] read = new Char[256];
// Reads 256 characters at a time.
int count = readStream.Read( read, 0, 256 );
while (count > 0)
// Dumps the 256 characters on a string and displays the string to the console.
String str = new String(read, 0, count);
count = readStream.Read(read, 0, 256);
lWebRequest = null;

it is giving me th xml in viewsource.

Any information on this will be very helpful


User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: How to get http request logs

Post by Support Team » Mon Sep 05, 2011 2:49 pm


I'm not sure if that's exactly what you want but have a look at following link: ... p-requests

Support Team