コード例 #1
0
 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;
 }
コード例 #2
0
 public void clearBrowserCache() {
   WebDriver webdriver = THREAD_WEB_DRIVER.get(currentThread().getId());
   if (webdriver != null) {
     webdriver.manage().deleteAllCookies();
   }
 }