protected WebDriver maximize(WebDriver driver) {
   if (startMaximized) {
     try {
       if (isChrome()) {
         maximizeChromeBrowser(driver.manage().window());
       } else {
         driver.manage().window().maximize();
       }
     } catch (Exception cannotMaximize) {
       log.warning("Cannot maximize " + browser + ": " + cannotMaximize);
     }
   }
   return driver;
 }
 public void clearBrowserCache() {
   WebDriver webdriver = THREAD_WEB_DRIVER.get(currentThread().getId());
   if (webdriver != null) {
     webdriver.manage().deleteAllCookies();
   }
 }