Hi Eric,
I have created sample app(Console App in c#) with Selenium Webdriver and BrowserMob Proxy. BrowserMob Proxy has method which return response,i'm write response to a file as follow using below code
Server server = new Server(<proxy path>);
server.Start();
Client client = server.CreateProxy();
client.NewHar("google");
var seleniumProxy = new Proxy { HttpProxy = client.SeleniumProxy };
var profile = new FirefoxProfile();
profile.SetProxyPreferences(seleniumProxy);
IWebDriver driver = new FirefoxDriver(profile);
driver.Navigate().GoToUrl(<url>);
// below harData has response
HarResult harData = client.GetHar();
System.IO.File.WriteAllText(<file path>, JsonConvert.SerializeObject(harData, Formatting.Indented));
Is it possible to do same thing with Selenium Webdriver and Fiddler.
Thanks,
Avinash.
I have created sample app(Console App in c#) with Selenium Webdriver and BrowserMob Proxy. BrowserMob Proxy has method which return response,i'm write response to a file as follow using below code
Server server = new Server(<proxy path>);
server.Start();
Client client = server.CreateProxy();
client.NewHar("google");
var seleniumProxy = new Proxy { HttpProxy = client.SeleniumProxy };
var profile = new FirefoxProfile();
profile.SetProxyPreferences(seleniumProxy);
IWebDriver driver = new FirefoxDriver(profile);
driver.Navigate().GoToUrl(<url>);
// below harData has response
HarResult harData = client.GetHar();
System.IO.File.WriteAllText(<file path>, JsonConvert.SerializeObject(harData, Formatting.Indented));
Is it possible to do same thing with Selenium Webdriver and Fiddler.
Thanks,
Avinash.