Esempio n. 1
0
  /** Maximize the current window */
  protected void _maximize() throws SAFSException {
    String message = null;

    // The window can't be resotred if it is maximized by selenium API.
    // So use the SAFS Robot to maximize the windows firstly
    try {
      super._maximize();
      return;
    } catch (SAFSException e) {
      message =
          "Can't maximize window by SAFS Robot. Try Selenium API to maximize. Exception="
              + e.getMessage();
      Log.warn(message);
      if (!sUtils.maximizeWindow(winObject.getWindowId(), selenium)) {
        throw new SAFSException("Fail to maximize by Selenium API.");
      }
    }
  }