I'm using browsermob proxy in order to capture traffic with webdrirver(chrome mostly). Here is the problem that I have: As long as I use single page everything is ok ,however when URL changes(due to navigating to other page or redirect), proxy is no longer captures any events (I'm not able to see those events in HAR file)
Here is how I start proxy:
BrowserMobProxyServer proxy = new BrowserMobProxyServer();
try {
proxy.start(Integer.valueOf(proxyPool.borrowProxyPort()), InetAddress.getLocalHost());
} catch (NumberFormatException | UnknownHostException e) {
Logger.error(e.getLocalizedMessage());
}
proxy.waitForQuiescence(30, 3, TimeUnit.SECONDS);
proxy.setHarCaptureTypes(CaptureType.REQUEST_HEADERS);
Logger.info("Proxy start status: " + proxy.isStarted());
And here is how I get har:
proxy.waitForQuiescence(10, 10, TimeUnit.SECONDS);
return proxy.getHar();
Do I need to somehow handle cases when URL changes or I'm missing smthn here?