Package org.eclipse.swtbot.forms.finder.widgets

Examples of org.eclipse.swtbot.forms.finder.widgets.SWTBotHyperlink


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotHyperlink hyperlinkInGroup(String mnemonicText, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Hyperlink.class), withMnemonic(mnemonicText), inGroup(inGroup));
    return new SWTBotHyperlink((Hyperlink) widget(matcher, index), matcher);
  }
View Full Code Here


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

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

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

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

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

public class SWTBotHyperlinkTest extends AbstractSWTBotFormsTest {

  @Test
  public void findHyperlink() throws Exception {
    String text = "This is an example of a form that is much longer and will need to wrap.";
    SWTBotHyperlink link = bot.hyperlink(text);
    assertNotNull(link);
    assertEquals(text, link.getText());
    assertEquals(Hyperlink.class, link.widget.getClass());
  }
View Full Code Here

  }

  @Test
  public void canFindHyperlinkWithRegex() throws Exception {
    String text = "example of a form .* is much longer";
    SWTBotHyperlink link = new SWTBotHyperlink((Hyperlink) bot.widget(withRegex(text)));
    assertNotNull(link);
    assertMatchesRegex(text, link.getText());
    assertEquals(Hyperlink.class, link.widget.getClass());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.forms.finder.widgets.SWTBotHyperlink

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.