Package net.sourceforge.marathon.component

Examples of net.sourceforge.marathon.component.ComponentNotFoundException


            }
        }
        // Delay and recheck just to make sure the app is not messing with
        // focus itself
        try {
            new Retry(new ComponentNotFoundException("Cannot find the component with focus, to receive the key stroke!",
                    scriptModel, windowMonitor), 1000, 3, new Retry.Attempt() {
                public void perform() {
                    if (resolver.getWindow().getFocusOwner() == null) {
                        retry();
                    }
View Full Code Here


            if (omapComponent != null) {
                runtimeLogger.warning(MODULE, message, msg.toString());
                return omapComponent;
            }
            runtimeLogger.error(MODULE, message, msg.toString());
            throw new ComponentNotFoundException("More than one component matched: " + omapComponents, null, null);
        }
        StringBuilder msg = new StringBuilder();
        omapComponent = findClosestMatch(component, msg);
        if (omapComponent != null) {
            runtimeLogger.warning(MODULE, "Could not find object map entry for component: " + getPropertyDisplayList(component),
View Full Code Here

                createVisibleStructure(component, sb, "    " + indent);
        }
    }

    private Component getContainer(final String name, int retryCount, String message) {
        final ComponentNotFoundException err = new ComponentNotFoundException(message, null, null);
        final Object[] found = new Object[1];
        new Retry(err, ComponentFinder.RETRY_INTERVAL_MS, retryCount, new Retry.Attempt() {
            public void perform() {
                Component c = findContainerForName(name);
                if (c == null) {
View Full Code Here

        final OMapComponent omapComponent = omapService.findComponentByName(name, topContainer);
        if (omapComponent == null) {
            return getContainer(name, retryCount, "Could not find component/container (InternalFrame) for: " + name);
        }
        String message = "More than one component matched for: " + name + " with properties: " + omapComponent;
        final ComponentNotFoundException err = new ComponentNotFoundException(message, null, null);
        final Object[] found = new Object[1];
        try {
            new Retry(err, ComponentFinder.RETRY_INTERVAL_MS, retryCount, new Retry.Attempt() {
                public void perform() {
                    List<Component> matchedComponents = findComponent(omapComponent);
                    found[0] = matchedComponents;
                    if (matchedComponents.size() != 1) {
                        if (matchedComponents.size() == 0) {
                            err.setMessage("No components matched for: " + name + " with properties: " + omapComponent);
                        } else
                            err.setMessage("More than one component matched for: " + name + " with properties: " + omapComponent);
                        retry();
                    }
                }
            });
        } catch (ComponentNotFoundException e) {
View Full Code Here

    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++) {
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.component.ComponentNotFoundException

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.