Class AtIndexElementLocator

  • All Implemented Interfaces:
    org.openqa.selenium.support.pagefactory.ElementLocator
    Direct Known Subclasses:
    FirstElementLocator

    public class AtIndexElementLocator
    extends Object
    implements org.openqa.selenium.support.pagefactory.ElementLocator
    ElementLocator retrieving a particular index element from another locator.
    • Field Detail

      • listLocator

        protected org.openqa.selenium.support.pagefactory.ElementLocator listLocator
    • Constructor Detail

      • AtIndexElementLocator

        public AtIndexElementLocator​(org.openqa.selenium.support.pagefactory.ElementLocator listLocator,
                                     int index)
        Creates a new at-index element locator.
        Parameters:
        listLocator - element list locator
        index - index to retrieve
    • Method Detail

      • findElement

        public org.openqa.selenium.WebElement findElement()
        Specified by:
        findElement in interface org.openqa.selenium.support.pagefactory.ElementLocator
      • findElements

        public List<org.openqa.selenium.WebElement> findElements()
        Specified by:
        findElements in interface org.openqa.selenium.support.pagefactory.ElementLocator