Interface HasTextFilter<C extends Component & HasText,SELF extends Locator<C,SELF>>

Type Parameters:
C - the component type, bound to HasText
SELF - the concrete locator subtype, used for fluent chaining
All Known Implementing Classes:
AnchorLocator, ButtonLocator, DescriptionListLocator, DivLocator, EmphasisLocator, H1Locator, H2Locator, H3Locator, H4Locator, H5Locator, H6Locator, ImageLocator, ListItemLocator, NativeButtonLocator, NativeLabelLocator, OrderedListLocator, ParagraphLocator, PreLocator, RouterLinkLocator, SpanLocator, UnorderedListLocator

public interface HasTextFilter<C extends Component & HasText,SELF extends Locator<C,SELF>>
Mixin for Locators whose target component implements HasText. Exposes text-based filter methods that would be meaningless on components without textual content, turning a call like findTextField().withText("foo") (TextField is HasValue/HasLabel, not HasText) into a compile error rather than a silent no-op.
  • Method Summary

    Modifier and Type
    Method
    Description
    default SELF
    Requires the text content of the component to equal the given text.
    default SELF
    Requires the text content of the component to contain the given text.
  • Method Details

    • withText

      default SELF withText(String text)
      Requires the text content of the component to equal the given text.
    • withTextContaining

      default SELF withTextContaining(String text)
      Requires the text content of the component to contain the given text.