Examples of IScriptElement


Examples of net.sourceforge.marathon.api.IScriptElement

        EventQueue eventQueue = window.getToolkit().getSystemEventQueue();
        eventQueue.postEvent(new WindowEvent(window, WindowEvent.WINDOW_CLOSING));
    }

    public IScriptElement enscript() {
        return new IScriptElement() {
            private static final long serialVersionUID = 1L;

            public ComponentId getComponentId() {
                return null;
            }
View Full Code Here

Examples of net.sourceforge.marathon.api.IScriptElement

                sb.append(node.getProperty());
                if (j < objects.length - 1) {
                    if (!((AssertionTreeNode) objects[j + 1]).getProperty().startsWith("["))
                        sb.append(".");
                } else {
                    IScriptElement enscript;
                    String property = sb.toString();
                    if (action == ASSERT_ACTION) {
                        if (property.equals("Content") && forComponent instanceof MCollectionComponent)
                            enscript = new AssertContent(forComponent.getComponentId(),
                                    ((MCollectionComponent) forComponent).getContent(), scriptModel, windowMonitor)
View Full Code Here

Examples of net.sourceforge.marathon.api.IScriptElement

        AWTSync.sync();
        assertScriptEquals(i1 + "if window('dialog1'):\n" + i2 + "assertEnabled('button1', true)\n" + i1 + "close()\n");
    }

    private IScriptElement recordable(final String component, final String windowTitle, final String python) {
        return new IScriptElement() {
            private static final long serialVersionUID = 1L;

            public String toScriptCode() {
                return Indent.getIndent() + python;
            }
View Full Code Here

Examples of net.sourceforge.marathon.api.IScriptElement

        assertSame(w2, inserter.getRootTag().getChildren().get(1));
    }

    @Test
    public void testNestedWindow() {
        IScriptElement child = null;
        inserter.add(w1 = window("window1"), mock());
        inserter.add(w2 = window("window2", "window1"), mock());
        inserter.add(window("window2", "window1"), mock());
        inserter.add(w3 = window("window1"), child = mock());
        assertEquals(2, w2.getChildren().size());
View Full Code Here

Examples of net.sourceforge.marathon.api.IScriptElement

    }

    public String toScriptCode() {
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < impl.size(); i++) {
            IScriptElement recordable = (IScriptElement) impl.get(i);
            if (recordable instanceof CompositeScriptElement && buffer.length() > 0) {
                buffer.append("\n");
            }
            buffer.append(recordable.toScriptCode());
            if (recordable instanceof CompositeScriptElement && nextIsNotAContainer(i)) {
                buffer.append("\n");
            }
        }
        return buffer.toString();
View Full Code Here

Examples of net.sourceforge.marathon.api.IScriptElement

            currentContainer.add(recordable);
    }

    private boolean undo(IScriptElement recordable) {
        if (recordable.isUndo()) {
            IScriptElement element = last();
            if (element != null && element.equals(recordable.getUndoElement())) {
                currentContainer.getChildren().removeLast();
            }
            return true;
        }
        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.