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

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


  }

  private static void typeKeystrokes(final Text text) throws IOException {
    fileWriter = new FileWriter("keyboard.layout");
    KeyboardLayoutGenerator.text = new SWTBotText(text);
    for (char c : Keys.getInputs()) {
      combination(c);
    }

    fileWriter.close();
View Full Code Here


    });

    try {
      bot.shell("SWT Controls").activate();
      bot.shell("Hello Shell").activate();
      SWTBotText text = bot.textWithLabel("My TextBox");
      assertEquals("Hello World", text.getText());
      text.setText("good bye world");
      assertEquals("good bye world", text.getText());
    } finally {
      // a hacked tear down
      UIThreadRunnable.syncExec(display, new VoidResult() {
        public void run() {
          try {
View Full Code Here

    bot.button("Clear").click();
    bot.button("One").setFocus();
    assertTrue(bot.button("One").isActive());
    bot.button("One").traverse(Traverse.TAB_NEXT);

    SWTBotText textInGroup = bot.textInGroup("Listeners");
    assertEventMatches(textInGroup, "Traverse [31]: TraverseEvent{Button {One} time=60232779 data=null character='\\0' keyCode=0 stateMask=0 doit=true detail=16}");
    assertEventMatches(textInGroup, "FocusOut [16]: FocusEvent{Button {One} time=60232779 data=null}");
    assertEventMatches(textInGroup, "FocusIn [15]: FocusEvent{Button {Two} time=60232779 data=null}");
    assertTrue(bot.button("Two").isActive());
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  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

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  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

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  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

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotText textWithMessage(String message, int index) {
    Matcher matcher = allOf(widgetOfType(Text.class), withMessage(message));
    return new SWTBotText((Text) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  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

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotText textWithId(String value, int index) {
    Matcher matcher = allOf(widgetOfType(Text.class), withId(value));
    return new SWTBotText((Text) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotText textInGroup(String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Text.class), inGroup(inGroup));
    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.