Examples of SWTBotButton


Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

   * @return a {@link SWTBotButton} with the specified <code>none</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotButton button(int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.PUSH, "SWT.PUSH"));
    return new SWTBotButton((Button) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

   * @return a {@link SWTBotButton} with the specified <code>label</code> with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotButton buttonWithLabelInGroup(String label, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withLabel(label), inGroup(inGroup), withStyle(SWT.PUSH, "SWT.PUSH"));
    return new SWTBotButton((Button) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

   * @return a {@link SWTBotButton} with the specified <code>mnemonicText</code> with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotButton buttonInGroup(String mnemonicText, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withMnemonic(mnemonicText), inGroup(inGroup), withStyle(SWT.PUSH, "SWT.PUSH"));
    return new SWTBotButton((Button) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

   * @return a {@link SWTBotButton} with the specified <code>tooltip</code> with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotButton buttonWithTooltipInGroup(String tooltip, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withTooltip(tooltip), inGroup(inGroup), withStyle(SWT.PUSH, "SWT.PUSH"));
    return new SWTBotButton((Button) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

     * NOTE: If a definition is not defined locally the global value should remain unchanged.
     * @throws Exception
     */
    @Test public void colorSchemeApplied() throws Exception {
        // Rule 5 applies
        final SWTBotButton button = bot.button("BuTToN");
        assertEquals(123, button.backgroundColor().getGreen());
        assertEquals(213, button.foregroundColor().getGreen());
        Display.getDefault().syncExec(new Runnable() {
            public void run() {
                assertEquals(null, button.widget.getBackgroundImage());
            }
        });
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

        SWTBotPreferences.PLAYBACK_DELAY = 10;
        SWTBotPreferences.TYPE_INTERVAL = 1000;
    }

    @Test public void testPrompt() throws Exception {
        SWTBotButton button = bot.button("BuTToN");
        button.click();

        SWTBotLabel label = bot.label("Enter a test prompt answer:");
        assertNotNull(label);

        //Thread.sleep(10000);
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton


    @Test public void testSingleDistinguishableFromDouble() throws Exception {
        SingleAndDblClickListener.dblClickWaitTime = 1000; // Screen shots take time

        SWTBotButton button = bot.button();
        button.click();
        assertEquals(1, preClicksHandled);

        Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
        assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
        assertEquals(1, clicks);
        assertEquals(1, clicksHandled);

        button.click();
        button.click();
        assertEquals(2, preClicksHandled);
        assertEquals(ACTION.DOUBLE_CLICK_ACTION, actionPerformed);
        assertEquals(3, clicks);
        assertEquals(2, clicksHandled);

        button.click();
        assertEquals(3, preClicksHandled);
        Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
        assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
        assertEquals(4, clicks);
        assertEquals(3, clicksHandled);

        button.click();
        assertEquals(4, preClicksHandled);
        Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
        assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
        assertEquals(5, clicks);
        assertEquals(4, clicksHandled);
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

        assertEquals(4, clicksHandled);
    }

    @Test public void testDoubleClick() {
        SingleAndDblClickListener.dblClickWaitTime = 1000; // Screen shots take time
        SWTBotButton button = bot.button();
        button.click();
        button.click();
        assertEquals(ACTION.DOUBLE_CLICK_ACTION, actionPerformed);
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

    @Test public void testCancelAction() throws InterruptedException {
        bot.button("Start Loading Action").click();
        bot.button("Cancel").click();
        try {
            SWTBotButton b = bot.button("Cancel");
            fail("Cancel button still active after loading action was canceled!");
        }catch(Throwable t) {
            assertTrue(true);
        }
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotButton

    @Test public void testFullLoad() {
        bot.button("Start Loading Action").click();
        bot.sleep(14000);
        try {
            SWTBotButton b = bot.button("Cancel");
            fail("Cancel button still active after loading action should have completed!");
        }catch(Throwable t) {
            assertTrue(true);
        }
    }
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.