Пример #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.");
      }
    }
  }
Пример #2
0
  /** Minimize the current window */
  protected void _minimize() throws SAFSException {
    String message = null;

    try {
      sUtils.minimizeWindow(testRecordData.getWindowGuiId());
      return;
    } catch (Throwable se) {
      message = "Can not minimize window with native function. Exception=" + se.getMessage();
      Log.warn(message);
      // If we fail to minimize window, try the SAFS Robot to do.
      try {
        super._minimize();
        return;
      } catch (Exception e) {
        message = "Fail to minimize window by SAFS Robot. Exception=" + message;
        Log.error(message);
        throw new SAFSException(message);
      }
    }
  }
Пример #3
0
 protected void setPosition() throws SAFSException {
   setFocusToWindow();
   super.setPosition();
 }
Пример #4
0
 protected void action_verifyGuiImageToFile() throws SAFSException {
   setFocusToWindow();
   super.action_verifyGuiImageToFile();
 }
Пример #5
0
 protected void action_getGuiImage() throws SAFSException {
   setFocusToWindow();
   super.action_getGuiImage();
 }
Пример #6
0
 protected void minimize() throws SAFSException {
   setFocusToWindow();
   super.minimize();
 }
Пример #7
0
 protected void restore() throws SAFSException {
   setFocusToWindow();
   super.restore();
 }