Package net.sourceforge.marathon.util

Examples of net.sourceforge.marathon.util.Retry


    protected void waitForWindowActive(Window window) {
        if (window == null)
            return;
        try {
            if (window instanceof Dialog || window instanceof Frame)
                new Retry(new ComponentNotFoundException("The window containing the component is not active", scriptModel,
                        windowMonitor), 1000, 60, new RetryWindowActive(window));
        } catch (TestException e) {
            e.captureScreen();
            throw e;
        }
View Full Code Here


    public void play(final ComponentFinder resolver) {
        if (keyStrokeText == null) {
            try {
                RuntimeException err = new ComponentNotFoundException("couldn't open menu " + menuItems, scriptModel, windowMonitor);
                new Retry(err, ComponentFinder.getRetryInterval(), ComponentFinder.getRetryCount(), new Retry.Attempt() {
                    public void perform() {
                        String[] items = menuItems.split("\\>\\>");
                        ArrayList<ComponentId> ids = new ArrayList<ComponentId>();
                        for (int i = 0; i < items.length; i++) {
                            String s = items[i];
View Full Code Here

    }

    private void getInstantiator(final Client client) {
        final Exception[] passback = new Exception[1];
        try {
            new Retry("looking up runtime instantiator", 600, 100, new Retry.Attempt() {
                public void perform() {
                    try {
                        instantiator = (IJavaRuntimeInstantiator) client.lookup(IJavaRuntimeInstantiator.class);
                        instantiator.setProperties(getProperties());
                        passback[0] = null;// clear the exception
View Full Code Here

        }
    }

    private int findMatchWithRetries(final String text) {
        try {
            new Retry("Search for combobox item", ComponentFinder.getRetryInterval(), ComponentFinder.getRetryCount(),
                    new Retry.Attempt() {
                        public void perform() {
                            if (findMatch(text) == -1)
                                retry();
                        }
View Full Code Here

        return createPropertyMapString(new String[] { "Path" });
    }

    private TreePath getTreePath() {
        try {
            new Retry("Search for cell component", ComponentFinder.getRetryInterval(), ComponentFinder.getRetryCount(),
                    new Retry.Attempt() {
                        public void perform() {
                            if (findTreePath(new StringBuffer()) == null)
                                retry();
                        }
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.util.Retry

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.