From: Ahmed A. <asa...@ya...> - 2015-09-29 15:09:19
|
Hi, Please subscribe to the list before posting. Have about: WebDriver driver = new HtmlUnitDriver(BrowserVersion.CHROME) { protected WebClient newWebClient(BrowserVersion version) { WebClient webClient = super.newWebClient(version); new WebConnectionWrapper(webClient) { public WebResponse getResponse(WebRequest request) throws IOException { long time = System.currentTimeMillis(); WebResponse response = super.getResponse(request); String url = request.getUrl().toExternalForm(); String content = response.getContentAsString(); long duration = time - System.currentTimeMillis(); return response; } }; return webClient; } }; Please also look into http://htmlunit.sourceforge.net/faq.html#HowToModifyRequestOrResponse Hope that helps,Ahmed From: "htm...@li..." <htm...@li...> To: htm...@li... Sent: Tuesday, September 29, 2015 4:40 PM Subject: Auto-discard notification ----- Forwarded Message ----- The attached message has been automatically discarded.Hello together, I am using selenium with the HtmlUnit (driver). So I am not fully sure if this will be the right mailinglist. But please let me elaborate first my issue. I need a possibility to measure following details from a webpage: - delivery speed of a full page by a given URL, from first access to the last file delivered on a fully dynamic JavaScript-Page (it maybe something between 3-100 http-requests) - the amount of requests which are fired by the given page URL - the total size in bytes of the fully loaded web page. So in Selenium I did not find any entrypoint, how to access this details. Debugging through the content I quickly get down to HtmlUnit classes, so I assume this can may be handled by HtmlUnit? Can someone help the blind out of the dark? best wishes, hkais |