Package org.jemmy

Examples of org.jemmy.JemmyException


    }

    @Override
    public void click(int count, Point p, MouseButton button) {
        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), button);
    }
View Full Code Here


    }

    @Override
    public void click(int count, Point p, MouseButton button, Modifier... modifiers) {
        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), button, modifiers);
    }
View Full Code Here

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

        public void select(final Tab state) {

            int targetIndex = getItems().indexOf(state);
            if (targetIndex < 0) {
                throw new JemmyException("This TabPane does not contain the requested tab", getControl());
            }
            int selectedIndex;
            while ((selectedIndex = getSelectedIndex()) != targetIndex) {
                keyboard().pushKey((selectedIndex < targetIndex) ? KeyboardButtons.RIGHT
                        : KeyboardButtons.LEFT);
View Full Code Here

                    screenRect.height) },
            new Class[] { java.awt.Rectangle.class });
         if (result.getClass().isAssignableFrom(BufferedImage.class)) {
             return new AWTImage(BufferedImage.class.cast(result));
         } else {
             throw new JemmyException("Screen capture (" + result
                     + ") is not a BufferedImage");
         }
    }
View Full Code Here

            try {
                outputStream.writeObject("exit");
                connectionEstablished = false;
                deleteProperties();
            } catch (IOException ex) {
                throw new JemmyException("Failed to invoke exit", ex);
            }
        }
    }
View Full Code Here

        try {
            Object result = robotReference.invokeMethod(method, params, paramClasses);
            synchronizeRobot();
            return result;
        } catch (InvocationTargetException e) {
            throw (new JemmyException("Exception during java.awt.Robot accessing", e));
        } catch (IllegalStateException e) {
            throw (new JemmyException("Exception during java.awt.Robot accessing", e));
        } catch (NoSuchMethodException e) {
            throw (new JemmyException("Exception during java.awt.Robot accessing", e));
        } catch (IllegalAccessException e) {
            throw (new JemmyException("Exception during java.awt.Robot accessing", e));
        }
    }
View Full Code Here

//                    System.out.println(f.get(null) + "=" + Environment.getEnvironment().getProperty((String)f.get(null)));
                }
            }
            fw.close();
        } catch (IllegalArgumentException ex) {
            throw new JemmyException("Failed to create temporary properties file: " + props.getAbsolutePath(), ex);
        } catch (IllegalAccessException ex) {
            throw new JemmyException("Failed to create temporary properties file: " + props.getAbsolutePath(), ex);
        } catch (IOException ex) {
            throw new JemmyException("Failed to create temporary properties file: " + props.getAbsolutePath(), ex);
        }

    }
View Full Code Here

                            if (line == null) {
                                break;
                            }
                            System.out.println("SERVER: " + line);
                        } catch (IOException ex) {
                            throw new JemmyException("Exception during other JVM output processing", ex);
                        }
                    }
                }
            }.start();
        } catch (IOException ex) {
            throw new JemmyException("Failed to start other JVM", ex);
        }
    }
View Full Code Here

                                    "with other JVM (" + connectionHost
                                    + ":" + connectionPort + ", exception: " + ex + ")";
                        }
                    });
                } else {
                    throw new JemmyException("Failed to establish socket " +
                            "connection with other JVM (" + connectionHost
                            + ":" + connectionPort + ")", ex);
                }
            }
            outputStream = new ObjectOutputStream(socket.getOutputStream());
            inputStream = new ObjectInputStream(socket.getInputStream());

            connectionEstablished = true;
            ready = true;

            System.out.println("Connection established!");
            setAutoDelay(autoDelay);
        } catch (IOException ex) {
            throw new JemmyException("Failed to establish socket connection " +
                    "with other JVM (" + connectionHost + ":" + connectionPort
                    + ")", ex);
        }
    }
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.