0

I am working upon designing an automatic client side performance tracking tool. I saw browsermob proxy alongwith selenium can be used for writing such tests. But, i am wondering if :-

Can BMP+Selenium be used for capturing network traffic for applications running on localhost and generate HAR files ?

I have googled and discovered tools for performing these operations, like, HAR can be generated using BMP+Selenium/Firebug+NetExport/Chrome dev tools but I am more interested if any APIs are available for these operations like Browser Navigation Timing API ?

Giriraj Sharma
  • 305
  • 3
  • 13
  • This question is too general / broad. I suggest you ask more specific questions. – Ron Klein Jun 23 '14 at 10:17
  • @RonKlein My question boils down to Can BMP+Selenium be used for capturing network traffic for applications running on localhost and generate HAR files ? if not, can PhantomJS be used for it ? I want to track performance while the webapp is running locally on localhost. One solution is like [Browser Navigation Timing API](https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html). – Giriraj Sharma Jun 23 '14 at 11:44
  • I understand your question, but the post includes a few more questions, that make "white noise" IMO. I truly think that if you rewrite your post with one, simple question, then the motivation to answer would increase. – Ron Klein Jun 23 '14 at 13:52
  • @RonKlein I have updated the question to meet the requirements. – Giriraj Sharma Jun 23 '14 at 20:01

1 Answers1

0

Using ChromeDriver and javascript you can track performance data, for example in Java:

ChromeDriver driver = createChromeDriver();
driver.get("http://xxx");
Object o = driver.executeScript("return window.performance.getEntries();");

Returns a json object containing performance data.

Geri
  • 1