Package org.eclipse.swtbot.swt.finder

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


  private static SWTBotCheckBox getIncludeFolderCheckbox( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).checkBox( "including all subfolders" );
  }

  private static SWTBotText getFilePatternText( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).text( 0 );
  }
View Full Code Here


  private static SWTBotText getFilePatternText( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).text( 0 );
  }

  private static SWTBotText getFolderPatternText( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).text( 1 );
  }
View Full Code Here

  private static SWTBotText getFolderPatternText( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).text( 1 );
  }

  private static SWTBotButton getOkButton( PathPatternDialog dialog ) {
    return new SWTBot( dialog.getShell() ).button( "OK" );
  }
View Full Code Here

  }

  public void setUp() throws Exception {
    super.setUp();
    populateData();
    bot = new SWTBot();
    table = bot.table();
  }
View Full Code Here

  }

  @Test
  public void noShellReturnsNull() throws Exception {
    try {
      new SWTBot().shell("non existing");
      fail("Was expecting an exception");
    } catch (WidgetNotFoundException expected) {
      pass();
    }
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void waitsForShellClose() throws Exception {

    long start = System.currentTimeMillis();
    new SWTBot().waitUntil(Conditions.shellCloses(new SWTBotShell(shell)));
    long end = System.currentTimeMillis();

    int time = (int) (end - start);
    assertThat(time, allOf(lessThan(5000), greaterThan(200)));
  }
View Full Code Here

    assertTextContains("Selection [13]: SelectionEvent{MenuItem {Push} time=", bot.textInGroup("Listeners").widget);
  }

  @Before
  public void setUp() throws Exception {
    bot = new SWTBot();
    activeShell = bot.activeShell();
    bot.tabItem("Menu").activate();

    bot.checkBox("Listen").select();
View Full Code Here

    assertTextContains("MouseDown [3]: MouseEvent{List {} ", text.widget);
  }

  @Test
  public void throwsExceptionInCaseOfInvalidIndexBasedSelection() throws Exception {
    SWTBot bot = new SWTBot();
    SWTBotList list = bot.listInGroup("List");
    try {
      list.select(100);
      fail("Was expecting an exception");
    } catch (RuntimeException e) {
      assertEquals("assertion failed: The index (100) is more than the number of items (9) in the list.", e.getMessage());
View Full Code Here

    }
  }

  @Test
  public void throwsExceptionInCaseOfInvalidTextBasedSelection() throws Exception {
    SWTBot bot = new SWTBot();
    SWTBotList list = bot.listInGroup("List");
    try {
      list.select("non existent item");
      fail("Was expecting an exception");
    } catch (RuntimeException e) {
      assertEquals("assertion failed: Item `non existent item' not found in list.", e.getMessage());
View Full Code Here

    this.graphicalViewer = graphicalViewer;
    init();
  }

  public SWTBot bot() {
    return new SWTBot(canvas.widget);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.SWTBot

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.