Examples of HarPage


Examples of org.browsermob.core.har.HarPage

        // also augment the HAR with some stuff
        String href = (String) driver.executeScript("return window.location.href;");
        if (href.contains("#")) {
            href = href.substring(0, href.indexOf("#"));
        }
        HarPage page = null;
        for (HarEntry entry : har.getLog().getEntries()) {
            if (href.equals(entry.getRequest().getUrl())) {
                for (HarPage harPage : har.getLog().getPages()) {
                    if (harPage.getId().equals(entry.getPageref())) {
                        page = harPage;
                        break;
                    }
                }
            }

            if (page != null) {
                break;
            }
        }

        if (page != null) {
            page.setTitle((String) driver.executeScript("return window.document.title;"));
            page.setStartedDateTime(new Date(navigationStart));
            HarPageTimings pageTimings = new HarPageTimings();
            pageTimings.setOnContentLoad(domContentLoadedEventEnd - navigationStart);
            pageTimings.setOnLoad(loadEventEnd - navigationStart);
            page.setPageTimings(pageTimings);
        }
    }
View Full Code Here

Examples of org.browsermob.core.har.HarPage

        if (pageRef == null) {
            pageRef = "Page " + pageCount;
        }

        client.setHarPageRef(pageRef);
        currentPage = new HarPage(pageRef);
        client.getHar().getLog().addPage(currentPage);

        pageCount++;
    }
View Full Code Here

Examples of org.browsermob.core.har.HarPage

        if (pageRef == null) {
            pageRef = "Page " + pageCount;
        }

        client.setHarPageRef(pageRef);
        currentPage = new HarPage(pageRef);
        client.getHar().getLog().addPage(currentPage);

        pageCount++;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.