Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.JemmyException


        if(driver instanceof Driver) {
            setDriver(id, (Driver)driver);
        } else if(driver instanceof LightDriver) {
            setDriver(id, (LightDriver)driver);
        } else {
            throw(new JemmyException("Driver is neither Driver nor LightDriver " +
                                     driver.toString()));
        }
    }
View Full Code Here


  waiter.getTimeouts().setTimeout("Waiter.WaitingTime",
          getTimeouts().getTimeout("JTableOperator.WaitEditingTimeout"));
  try {
      return((Component)waiter.waitAction(null));
  } catch(InterruptedException e) {
      throw(new JemmyException("Waiting has been interrupted", e));
  }
    }
View Full Code Here

     */
    public void wtComponentEnabled() {
        try {
            waitComponentEnabled();
        } catch(InterruptedException e) {
            throw(new JemmyException("Interrupted!", e));
        }
    }
View Full Code Here

  output.printGolden("Push button");
  makeComponentVisible();
        try {
            waitComponentEnabled();
        } catch(InterruptedException e) {
            throw(new JemmyException("Interrupted", e));
        }
  driver.push(this);
    }
View Full Code Here

  output.printGolden("Press button");
  makeComponentVisible();
        try {
            waitComponentEnabled();
        } catch(InterruptedException e) {
            throw(new JemmyException("Interrupted", e));
        }
  driver.press(this);
    }
View Full Code Here

  output.printLine("Release button\n    :" + toStringSource());
  output.printGolden("Release button");
        try {
            waitComponentEnabled();
        } catch(InterruptedException e) {
            throw(new JemmyException("Interrupted", e));
        }
  driver.release(this);
    }
View Full Code Here

  makeComponentVisible();
  if(getState() != newValue) {
      try {
    waitComponentEnabled();
      } catch(InterruptedException e) {
    throw(new JemmyException("Interrupted!", e));
      }
      output.printLine("Change checkbox selection to " + (newValue ? "true" : "false") +
           "\n    :" + toStringSource());
      output.printGolden("Change checkbox selection to " + (newValue ? "true" : "false"));
      driver.push(this);
View Full Code Here

       toStringSource());
  output.printGolden("Select " + Integer.toString(index) + "\'th item in combobox");
        try {
            waitComponentEnabled();
        } catch(InterruptedException e) {
            throw new JemmyException("Interrupted", e);
        }

  driver.selectItem(this, waitItem(index));

  if(getVerification()) {
View Full Code Here

                          PathChooser chooser, int depth, boolean pressMouse) {
        try {
            oper.waitComponentVisible(true);
            oper.waitComponentEnabled();
        } catch(InterruptedException e) {
            throw(new JemmyException("Interrupted!", e));
        }
  MouseDriver mDriver = DriverManager.getMouseDriver(oper);
        //mDriver.enterMouse(oper);
        //use enhanced algorithm instead
        smartMove(lastItem, oper);
  if(depth > chooser.getDepth() - 1) {
            if(oper instanceof JMenuOperator &&
               menuBar != null && getSelectedElement(menuBar) != null) {
                //mDriver.enterMouse(oper);
            } else {
                DriverManager.getButtonDriver(oper).push(oper);
            }
      return(oper.getSource());
  }
  if(pressMouse && !((JMenuOperator)oper).isPopupMenuVisible() &&
           !(menuBar != null && getSelectedElement(menuBar) != null)) {
      DriverManager.getButtonDriver(oper).push(oper);
  }
  oper.getTimeouts().sleep("JMenuOperator.WaitBeforePopupTimeout");
  JMenuItem item = waitItem(oper, waitPopupMenu(oper), chooser, depth);
        mDriver.exitMouse(oper);
  if(item instanceof JMenu) {
      JMenuOperator mo = new JMenuOperator((JMenu)item);
      mo.copyEnvironment(oper);
      return(push(mo, oper, null, chooser, depth + 1, false));
  } else {
      JMenuItemOperator mio = new JMenuItemOperator(item);
      mio.copyEnvironment(oper);
            try {
                mio.waitComponentEnabled();
            } catch(InterruptedException e) {
                throw(new JemmyException("Interrupted!", e));
            }
            //move here first
            smartMove(oper, mio);
      DriverManager.getButtonDriver(oper).push(mio);
      return(item);
View Full Code Here

  waiter.setOutput(oper.getOutput().createErrorOutput());
  waiter.setTimeouts(oper.getTimeouts());
  try {
      return((JMenuItem)waiter.waitAction(null));
  } catch(InterruptedException e) {
      throw(new JemmyException("Waiting has been interrupted", e));
  }
    }
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.JemmyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.