Package org.eclipse.swtbot.swt.finder.widgets

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


    }


    private String clickCheckButton( final String label )
    {
        SWTBotShell shell = BotUtils.shell( new Runnable()
        {
            public void run()
            {
                bot.button( label ).click();
            }
        }, "Error", label );

        String shellText = shell.getText();
        String labelText = bot.label( 1 ).getText(); // label(0) is the image
        bot.button( "OK" ).click();

        if ( shellText.equals( label ) )
        {
View Full Code Here


    return "The shell '" + text + "' did not activate"; //$NON-NLS-1$ //$NON-NLS-2$
  }

  public boolean test() throws Exception {
    try {
      final SWTBotShell shell = bot.shell(text);
      return UIThreadRunnable.syncExec(new BoolResult() {
        public Boolean run() {
          return shell.widget.isVisible() || shell.widget.isFocusControl();
        }
      });
View Full Code Here

      public void run() {
        action.getShell().open();
      }
    });

    SWTBotShell bot = new SWTBotShell(action.getShell());
    bot.bot().link().click();

    Format format = new SimpleDateFormat(CalendarAction.DATE_FORMAT);
    assertEquals(format.format(today.getTime()), action.getText());

    Calendar cal = action.getCalendar();
View Full Code Here

      Shell mainWindow = syncExec(new WidgetResult<Shell>() {
        public Shell run() {
          return styledText.widget.getShell();
        }
      });
      SWTBotShell shell = bot.shell("", mainWindow); //$NON-NLS-1$
      shell.activate();
      log.debug("Activated quickfix shell."); //$NON-NLS-1$
      return shell;
    } catch (Exception e) {
      throw new QuickFixNotFoundException("Quickfix popup not found. Giving up.", e); //$NON-NLS-1$
    }
View Full Code Here

   * @return a wrapper around a {@link Shell} with the specified index.
   * @param text the text on the shell.
   * @param index the index of the shell, in case there are multiple shells with the same text.
   */
  public SWTBotShell shell(String text, int index) {
    return new SWTBotShell(shells(text).get(index));
  }
View Full Code Here

   * @param text the text on the shell.
   * @param parent the parent under which a shell will be found.
   * @param index the index of the shell, in case there are multiple shells with the same text.
   */
  public SWTBotShell shell(String text, Shell parent, int index) {
    return new SWTBotShell(shells(text, parent).get(index));
  }
View Full Code Here

   * @since 2.0
   */
  public SWTBotShell shellWithId(String value, int index) {
    WaitForShell waitForShell = waitForShell(withId(value));
    waitUntilWidgetAppears(waitForShell);
    return new SWTBotShell(waitForShell.get(index));
  }
View Full Code Here

   * @return a wrapper around a @{link Shell} with the specified key/value pair for its id.
   */
  public SWTBotShell shellWithId(String key, String value, int index) {
    WaitForShell waitForShell = waitForShell(withId(key, value));
    waitUntilWidgetAppears(waitForShell);
    return new SWTBotShell(waitForShell.get(index));
  }
View Full Code Here

   */
  public SWTBotShell[] shells() {
    Shell[] shells = finder.getShells();
    ArrayList<SWTBotShell> result = new ArrayList<SWTBotShell>();
    for (Shell shell : shells) {
      result.add(new SWTBotShell(shell));
    }
    return result.toArray(new SWTBotShell[] {});
  }
View Full Code Here

   *
   * @return the current active shell
   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotShell activeShell() throws WidgetNotFoundException {
    return new SWTBotShell(getFinder().activeShell());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

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.