Package org.jemmy

Examples of org.jemmy.JemmyException


            }
            try {
                res = ImageLoader.class.cast(Class.forName(String.class.cast(loaderClass)).newInstance());
                setImageLoader(res);
            } catch (InstantiationException ex) {
                throw new JemmyException("Unable to instantiate image loader ", ex, loaderClass);
            } catch (IllegalAccessException ex) {
                throw new JemmyException("Unable to instantiate image loader ", ex, loaderClass);
            } catch (ClassNotFoundException ex) {
                throw new JemmyException("No image loader class ", ex, loaderClass);
            }
        }
        return res;
    }
View Full Code Here


            }
            try {
                res = ImageCapturer.class.cast(Class.forName(String.class.cast(capturerClass)).newInstance());
                setImageCapturer(res);
            } catch (InstantiationException ex) {
                throw new JemmyException("Unable to instantiate image capturer ", ex, capturerClass);
            } catch (IllegalAccessException ex) {
                throw new JemmyException("Unable to instantiate image capturer ", ex, capturerClass);
            } catch (ClassNotFoundException ex) {
                throw new JemmyException("No image capturer class ", ex, capturerClass);
            }
        }
        return res;
    }
View Full Code Here

            if (factoryClass != null) {
                try {
                    res = ControlInterfaceFactory.class.cast(Class.forName(String.class.cast(factoryClass)).newInstance());
                    setInputFactory(res);
                } catch (InstantiationException ex) {
                    throw new JemmyException("Unable to instantiate input factory", ex, factoryClass);
                } catch (IllegalAccessException ex) {
                    throw new JemmyException("Unable to instantiate input factory", ex, factoryClass);
                } catch (ClassNotFoundException ex) {
                    throw new JemmyException("Unable to load input factory", ex, factoryClass);
                }
            }
        }
        return res;
    }
View Full Code Here

    public void sleep() {
        if (getValue() > 0) {
            try {
                Thread.sleep(getValue());
            } catch (InterruptedException e) {
                throw (new JemmyException("Sleep " +
                        getName() +
                        " was interrupted!",
                        e));
            }
        }
View Full Code Here

            queue.notifyAll();
        }
        r.waitCompleted();

        if (r.failed()) {
            throw new JemmyException("Action '" + r + "' invoked through ActionQueue failed", r.getThrowable());
        }
    }
View Full Code Here

        } catch (RuntimeException e) {
            throwable = e;
            throw e;
        } catch (Exception e) {
            throwable = e;
            throw new JemmyException("Exception in action " + this.toString(), e);
        } finally {
            endTime = System.currentTimeMillis();
        }
    }
View Full Code Here

                    public void run() {
                        action.execute(parameters);
                    }
                });
            } catch (InterruptedException ex) {
                throw new JemmyException("Unable to run action " + action, ex);
            } catch (InvocationTargetException ex) {
                throw new JemmyException("Unable to run action " + action, ex);
            }
        }
    }
View Full Code Here

                    public void run(Object... parameters) {
                        setResult(state.getScene());
                    }
                }.dispatch(getEnvironment());
                if (new_selected_scene == null) {
                    throw new JemmyException("The menu bar can not be expanded", getControl());
                }
                Wrap<? extends Scene> popup_scene_wrap = new SceneWrap(getEnvironment(), new_selected_scene);
                Wrap<Node> item = popup_scene_wrap.as(Parent.class, Node.class).lookup(new LookupCriteria<Node>() {
                    @Override
                    public boolean check(Node control) {
                        return control.equals(state);
                    }
                }).wrap(0);
                item.mouse().click();
            } else {
                Boolean found = new GetAction<Boolean>() {
                    @Override
                    public void run(Object... parameters) {
                        for (Node item : getToolBar().getItems()) {
                            if (item.equals(state)) {
                                setResult(true);
                                return;
                            }
                        }
                        setResult(false);
                    }
                }.dispatch(getEnvironment());

                if (!found) {
                    throw new JemmyException("The menu bar does not contain an item", getControl());
                }

                new NodeWrap(getEnvironment(), state).mouse().click();
            }
View Full Code Here

            if (count == 0) {
                scroll = null;
            } else if (count == 1) {
                scroll = lookup.wrap(0).as(AbstractScroll.class);
            } else {
                throw new JemmyException("There are more than 1 "
                        + (vertical ? "vertical" : "horizontal")
                        + " ScrollBars in this ListView");
            }
        }
    }
View Full Code Here

        if (count == 0) {
            scroll = null;
        } else if (count == 1) {
            scroll = lookup.wrap(0).as(AbstractScroll.class);
        } else {
            throw new JemmyException("There are more then 1 vertical "
                    + "ScrollBars in this TreeView");
        }
    }
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.