Package org.jemmy

Examples of org.jemmy.JemmyException


                if (Menu.class.isAssignableFrom(control.getClass())) {
                    return (Wrap<? extends T>) new MenuWrap<Menu>((Menu)control, wrap);
                }
                return (Wrap<? extends T>) new MenuItemWrap<ITEM>((ITEM)control, wrap);
            }
            throw new JemmyException("Unexpected control class is used: " + controlClass);
        }
View Full Code Here


        }.dispatch(getEnvironment());
    }

    private void ensureNoTriState() {
        if (isTriState()) {
            throw new JemmyException("The check box has allowTriState on - not possible to treat as boolean selectable", getControl());
        }
    }
View Full Code Here

            wrapper.setAction(action);
            wrapper.setParameters(parameters);
            Platform.runLater(wrapper);
            wrapper.waitDone(env.getTimeout(MAX_ACTION_TIME));
            if (wrapper.failed()) {
                throw new JemmyException("Failed to execute action '" + action + "' through Platform.runLater", action.getThrowable());
            }
        }
    }
View Full Code Here

                    Class[] argTypes = new Class[] { String[].class };
                    Method main = mainClass.getMethod("main", argTypes);
                    //String[] mainArgs = Arrays.copyOfRange(parameters, 1, parameters.length);
                    main.invoke(null, (Object)parameters);
                } catch (IllegalAccessException ex) {
                    throw new JemmyException("Unable to execute " + mainClass.getName(), ex);
                } catch (IllegalArgumentException ex) {
                    throw new JemmyException("Unable to execute " + mainClass.getName(), ex);
                } catch (InvocationTargetException ex) {
                    throw new JemmyException("Unable to execute " + mainClass.getName(), ex);
                } catch (NoSuchMethodException ex) {
                    throw new JemmyException("Unable to execute " + mainClass.getName(), ex);
                } catch (SecurityException ex) {
                    throw new JemmyException("Unable to execute " + mainClass.getName(), ex);
                }
            }
        });
    }
View Full Code Here

    }

    @Override
    public void press() {
        if (!isInWindow(node, lastMove)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.press();
    }
View Full Code Here

    }

    @Override
    public void press(MouseButton button) {
        if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.press(button);
    }
View Full Code Here

    }

    @Override
    public void press(MouseButton button, Modifier... modifiers) {
        if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.press(button, modifiers);
    }
View Full Code Here

    }

    @Override
    public void click() {
        if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.click();
    }
View Full Code Here

    }

    @Override
    public void click(int count) {
        if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.click(count);
    }
View Full Code Here

    }

    @Override
    public void click(int count, Point p) {
        if (!isInWindow(node, p)) {// TODO: using drag&drop is questionable
            throw new JemmyException("Click point is outside the window", node);
        }
        theMouse.click(count, NodeWrap.convertToAbsoluteLayout(node, p));
    }
View Full Code Here

TOP

Related Classes of org.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.