private int getDefaultWait() {
   Timeout tm = getController().getTimeout();
   int wait = tm.getLoad();
   if (wait == 0) {
     wait = tm.getWait();
   }
   if (wait == 0) {
     wait = 30;
   }
   return wait;
 }
 @Override
 public void setTimeout(Timeout timeout) {
   WebDriver.Timeouts tm = getDriver().manage().timeouts();
   if (timeout.getWait() != 0) {
     tm.implicitlyWait(timeout.getWait(), TimeUnit.SECONDS);
   }
   if (timeout.getScript() != 0) {
     tm.setScriptTimeout(timeout.getScript(), TimeUnit.SECONDS);
   }
   if (timeout.getLoad() != 0) {
     tm.pageLoadTimeout(timeout.getLoad(), TimeUnit.SECONDS);
   }
 }