private void GetHarFile() { try { if (Config.settings.httpProxy.startProxy) { var name = Common.GetShortTestName(80); proxy.SaveHarToFile(); Log.FilePath(proxy.GetHarFilePath()); proxy.CreateHar(); } } catch (Exception e) { throw new Exception("Error caught getting BMP Har File : " + e.Message); } }
//commented out Proxy stuff because browserMobProxy is not implimented private void GetHarFile() { try { if (Config.Settings.httpProxy.startProxy) { var name = Common.GetShortTestName(80); proxy.SaveHarToFile(); TestLog.Attach(new BinaryAttachment("HTTP_Traffic_" + name + ".har", "application/json", File.ReadAllBytes(proxy.GetHarFilePath()))); proxy.CreateHar(); } } catch (Exception e) { throw new Exception("Error caught getting BMP Har File : " + e.Message); } }
private void StartProxy() { try { if (Config.settings.httpProxy.startProxy) { proxy = new BrowserMobProxy(); proxy.StartServer(); proxy.CreateProxy(); proxy.CreateHar(); } } catch (Exception) { } }