Search in sources :

Example 1 with ChromePagePerformanceUtil

use of org.utils.ChromePagePerformanceUtil in project selenium_java by sergueik.

the class ChromePagePerformanceTest method testUtil.

// @Ignore
@Test
public void testUtil() {
    ChromePagePerformanceUtil pageLoadTimer = ChromePagePerformanceUtil.getInstance();
    double pageLoadTime = pageLoadTimer.getLoadTime(driver, baseURL, elementSelector);
    System.out.println("Page Load Time: " + pageLoadTime);
    Map<String, Double> pageElementTimers = pageLoadTimer.getPageElementTimers();
    if (conn != null) {
        Set<String> names = pageElementTimers.keySet();
        for (String name : names) {
            insertData(name, pageElementTimers.get(name));
        }
    }
}
Also used : ChromePagePerformanceUtil(org.utils.ChromePagePerformanceUtil) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ChromePagePerformanceUtil (org.utils.ChromePagePerformanceUtil)1