Package org.jemmy.action

Examples of org.jemmy.action.GetAction


     */
    public Object getFieldProperty(final String name) {
        if (!hasFieldProperty(name)) {
            throw new JemmyException("No \"" + name + "\" field property specified on " + getClass().getName());
        }
        GetAction action = new GetAction() {

            @Override
            public void run(Object... parameters) throws Exception {
                setResult(getControl().getClass().getField(name).get(getControl()));
            }
        };
        Object result = action.dispatch(env);
        if (action.getThrowable() != null) {
            throw new JemmyException("Unable to obtain property \"" + name + "\"", action.getThrowable(), this);
        }
        return result;
    }
View Full Code Here


     */
    public Object getMethodProperty(final String name) {
        if (!hasMethodProperty(name)) {
            throw new JemmyException("No \"" + name + "\" method property specified on " + getClass().getName());
        }
        GetAction action = new GetAction() {

            @Override
            public void run(Object... parameters) throws Exception {
                setResult(getControl().getClass().getMethod(name).invoke(getControl()));
            }

            @Override
            public String toString() {
                return "Getting property \"" + name + "\" on " + getClass().getName();
            }
        };
        Object result = action.dispatch(env);
        if (action.getThrowable() != null) {
            throw new JemmyException("Unable to obtain property \"" + name + "\"", action.getThrowable(), this);
        }
        return result;
    }
View Full Code Here

            }
        }.dispatch(getEnvironment());
    }

    public Object getState() {
        return new GetAction() {

            @Override
            public void run(Object... os) throws Exception {
                setResult(getControl().getSelectionModel().getSelectedItem());
            }
View Full Code Here

            }
        }.dispatch(getEnvironment());
    }

    public Object getState() {
        return new GetAction() {

            @Override
            public void run(Object... os) throws Exception {
                setResult(getControl().getSelectionModel().getSelectedItem());
            }
View Full Code Here

            }
        }.dispatch(getEnvironment());
    }
   
    Object getRow(final int index) {
        return new GetAction() {

            @Override
            public void run(Object... parameters) throws Exception {
                setResult(getControl().getItems().get(index));
            }
View Full Code Here

TOP

Related Classes of org.jemmy.action.GetAction

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.