Package org.jemmy

Examples of org.jemmy.JemmyException


     */
    public int convert(KeyboardButton button) {
        try {
            return key2int.get(button);
        } catch(Exception e) {
            throw new JemmyException("Unable to recognize key", e, button);
        }
    }
View Full Code Here


        int result = 0;
        for (Modifier modifier : modifiers) {
            try {
                result |= modifier2int.get(modifier);
            } catch (Exception e) {
                throw new JemmyException("Unable to recognize modifier", e, modifier);
            }
        }
        return result;
    }
View Full Code Here

     */
    public int convert(MouseButton button) {
        try {
            return button2int.get(button);
        } catch (Exception e) {
            throw new JemmyException("Unable to recognize mouse button", e, button);
        }
    }
View Full Code Here

     * @return
     */
    public KeyboardButton convertKeyboardButton(int key) {
        KeyboardButton res = int2key.get(key);
        if (res == null) {
            throw new JemmyException("Unable to recognize key", key);
        }
        return res;
    }
View Full Code Here

        List<Modifier> result = new ArrayList<Modifier>();
        for (int key : int2modifier.keySet()) {
            if ((key & modifiers) != 0) {
                Modifier res = int2modifier.get(key);
                if (res == null) {
                    throw new JemmyException("Unable to recognize modifiers", modifiers);
                }
                result.add(res);
            }
        }
        return result.toArray(new Modifier[result.size()]);
View Full Code Here

     * @return
     */
    public MouseButton convertMouseButton(int button) {
        MouseButton res = int2button.get(button);
        if (res == null) {
            throw new JemmyException("Unable to recognize mouse button", button);
        }
        return res;
    }
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

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.