Class HtmlTagFinder

  • All Implemented Interfaces:
    org.hamcrest.SelfDescribing, Finder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
    Direct Known Subclasses:
    DivFinder, ImageFinder, InputFinder, LinkFinder, PageTitleFinder, TableCellFinder, TableFinder

    public abstract class HtmlTagFinder
    extends BaseFinder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
    Base Finder for all types of HTML tags. Subclasses should be created for each specific tag, specifying the tag name (e.g. "a" in the case or an anchor tag), and a description.
    • Constructor Detail

      • HtmlTagFinder

        public HtmlTagFinder()
    • Method Detail

      • extractFrom

        protected java.util.Collection<org.openqa.selenium.WebElement> extractFrom​(org.openqa.selenium.WebDriver context)
        Specified by:
        extractFrom in class BaseFinder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
      • describeTargetTo

        protected void describeTargetTo​(org.hamcrest.Description description)
        Specified by:
        describeTargetTo in class BaseFinder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
      • with

        public HtmlTagFinder with​(org.hamcrest.Matcher<org.openqa.selenium.WebElement> matcher)
        Specified by:
        with in interface Finder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
        Overrides:
        with in class BaseFinder<org.openqa.selenium.WebElement,​org.openqa.selenium.WebDriver>
      • tagName

        protected abstract java.lang.String tagName()
      • tagDescription

        protected abstract java.lang.String tagDescription()