Examples of SWTBot


Examples of org.eclipse.swtbot.swt.finder.SWTBot

            }
        }.start();
    }

    @BeforeClass public static void beforeClass() throws Exception {
        bot = new SWTBot();
        // slow down tests
        SWTBotPreferences.PLAYBACK_DELAY = 10;
        SWTBotPreferences.TYPE_INTERVAL = 1000;
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

            }
        }.start();
    }

    @BeforeClass public static void beforeClass() throws Exception {
        bot = new SWTBot();
        // slow down tests
        SWTBotPreferences.PLAYBACK_DELAY = 10;
        SWTBotPreferences.TYPE_INTERVAL = 1000;
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

            }
        }.start();
    }

    @BeforeClass public static void beforeClass() throws Exception {
        bot = new SWTBot();
        // slow down tests
        SWTBotPreferences.PLAYBACK_DELAY = 10;
        SWTBotPreferences.TYPE_INTERVAL = 1000;
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    }


    public PreferencesBot openPreferences()
    {
        new SWTBot().menu( "Window" ).menu( "Preferences" ).click();
        return new PreferencesBot();
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    /**
     * Waits until the watched job is done.
     */
    public void waitUntilDone()
    {
        SWTBot bot = new SWTBot();
        bot.waitUntil( new DefaultCondition()
        {

            public boolean test() throws Exception
            {
                if ( done.get() )
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    }


    private int getSwtObjectCount()
    {
        final SWTBot bot = new SWTBot();
        return UIThreadRunnable.syncExec( bot.getDisplay(), new IntResult()
        {
            public Integer run()
            {
                DeviceData info = bot.getDisplay().getDeviceData();
                if ( !info.tracking )
                {
                    fail( "To run this test options 'org.eclipse.ui/debug' and 'org.eclipse.ui/trace/graphics' must be true." );
                }
                return info.objects.length;
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    createClass(projectName, "Class", packageName, className);
  }

  private void createClass(String projectName, String classType,
      String packageName, String className) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName).select("src");
    bot.menu("File").menu("New").menu(classType).click();
    bot.textWithLabel("Package:").setText(packageName);
    bot.textWithLabel("Name:").setText(className);
    bot.button("Finish").click();
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    setupProjectDependency(projectName);
  }

  private void setupProjectDependency(String projectName) {
    bot.menu("Window").menu("Show View").menu("Navigator").click();
    SWTBot localBot = bot.viewByTitle("Navigator").bot();
    SWTBotTree tree = localBot.tree();
    SWTBotTreeItem node = tree.expandNode(projectName + "Test");
    node = node.expandNode(".classpath").select();

    final SWTBotContextMenu cmenu = new SWTBotContextMenu(tree);
    bot.performWithTimeout(new VoidResult() {
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

            + ");", "Assert.assertEquals(\"expected result\", "
            + expectedResultStr + ", result);", "}", "}");
  }

  private void createJUnit4TestSuite(String projectName, String packageName) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName + "Test", "src")
        .select(packageName);
    bot.menu("File").menu("New").menu("Other...").click();
    bot.shell("New").activate();
    bot.tree().expandNode("Java", "JUnit 4").select("JUnit 4 Test Suite");
    bot.button("Next >").click();
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    bot.button("Finish").click();
  }

  private void executeJUnit4TestSuiteInUi(String projectName,
      String packageName) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName + "Test", "src", packageName)
        .select("AllTests.java");
    SWTBotMenu menu = bot.menu("Run").menu("Run As");
    try {
      getSubMenuItemContainingTest(menu, "JUnit Test");
    } catch (WidgetNotFoundException wnfe) {
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.