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

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


    }


    public void typeConnectionName( String connectionName )
    {
        SWTBotText connText = bot.textWithLabel( CONNECTION_NAME );
        connText.setText( connectionName );
    }
View Full Code Here


    }


    public void typePassword( String password )
    {
        SWTBotText passwordText = bot.textWithLabel( BIND_PASSWORD );
        passwordText.setText( password );
    }
View Full Code Here


    void typeValueAndFinish( String value )
    {
        SWTBotPreferences.KEYBOARD_LAYOUT = "org.eclipse.swtbot.swt.finder.keyboard.EN_US";
        SWTBotText text = bot.text( 1 );
        text.setText( value );
        bot.tree().pressShortcut( Keystrokes.LF );
    }
View Full Code Here

  public void testApply_storage() {
    openRabbitPreferences();

    String storagePath = System.getProperty("user.home") + File.separator
        + "rabbit.testing";
    SWTBotText text = bot.textWithLabel("Location:");
    text.setText(storagePath);
    bot.button("Apply").click();
    try {
      // A message box may be popped up asking to move the old files.
      bot.button("No").click();
    } catch (WidgetNotFoundException e) {}
    assertEquals(storagePath, XmlPlugin.getDefault().getStoragePathRoot()
        .toOSString());

    storagePath = System.getProperty("user.home") + File.separator
        + System.nanoTime() + "";
    text.setText(storagePath);
    bot.button("Apply").click();
    try {
      // A message box may be popped up asking to move the old files.
      bot.button("No").click();
    } catch (WidgetNotFoundException e) {}
View Full Code Here

  }

  @Test
  public void testDefaults_storage() {
    openRabbitPreferences();
    SWTBotText text = bot.textWithLabel("Location:");
    text.setText("what?");
    bot.button("Restore Defaults").click();
    assertEquals(XmlPlugin.getDefault().getStoragePathRoot().toOSString(), text
        .getText());
    bot.activeShell().close();
  }
View Full Code Here

  public void testOk_storage() {
    openRabbitPreferences();

    String storagePath = System.getProperty("user.home") + File.separator
        + System.nanoTime() + "";
    SWTBotText text = bot.textWithLabel("Location:");
    text.setText(storagePath);
    bot.button("OK").click();
    try {
      // A message box may be popped up asking to move the old files.
      bot.button("No").click();
    } catch (WidgetNotFoundException e) {}
    assertEquals(storagePath, XmlPlugin.getDefault().getStoragePathRoot()
        .toOSString());

    openRabbitPreferences();
    storagePath = System.getProperty("user.home") + File.separator
        + System.nanoTime() + "";
    text = bot.textWithLabel("Location:");
    text.setText(storagePath);
    bot.button("OK").click();
    try {
      // A message box may be popped up asking to move the old files.
      bot.button("No").click();
    } catch (WidgetNotFoundException e) {}
View Full Code Here

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

   * @return a {@link SWTBotText} with the specified <code>text</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotText text(String text, int index) {
    Matcher matcher = allOf(widgetOfType(Text.class), withText(text));
    return new SWTBotText((Text) widget(matcher, index), matcher);
  }
View Full Code Here

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

   * @return a {@link SWTBotText} with the specified <code>key/value</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotText textWithId(String key, String value, int index) {
    Matcher matcher = allOf(widgetOfType(Text.class), withId(key, value));
    return new SWTBotText((Text) widget(matcher, index), matcher);
  }
View Full Code Here

TOP

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

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.