Ramesh
Ramesh

Reputation: 33

Read requests and responses made by browser on naviagating a web page in C# webdriver

I wants to read all the requests and responses made and get by the browser on navigating on a page.

For ex: If I navigate to http://www.yahoo.com then we observe that browser is making a lots of GET and post requests. For the purpose of image loading, content loading and to display the Ads (Advertisement).

I am using selenium web driver and C#.

Can you please help me how can I get all the requests (get/post) and responses.

Thanks, Ramesh Jhajharia

Upvotes: 0

Views: 2927

Answers (1)

JimEvans
JimEvans

Reputation: 27496

The best way to accomplish this is to use some sort of scriptable proxy. One such proxy is the BrowserMob proxy, and there's even a .NET wrapper for it. This would allow you to gather information that is outside the scope of WebDriver, such as the raw HTTP requests that you are asking for.

Upvotes: 2

Related Questions