Class ElementOption

    • Constructor Summary

      Constructors 
      Constructor Description
      ElementOption()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> build()
      Creates a map based on the provided options.
      static ElementOption element​(org.openqa.selenium.WebElement element)
      This method creates a build instance of the ElementOption.
      static ElementOption element​(org.openqa.selenium.WebElement element, int x, int y)
      This method creates a build instance of the ElementOption.
      static ElementOption element​(org.openqa.selenium.WebElement element, org.openqa.selenium.Point offset)
      This method creates a build instance of the ElementOption.
      protected void verify()
      This method is automatically called before building options map to verify the consistency of the instance.
      ElementOption withCoordinates​(int xOffset, int yOffset)
      It defines x and y offset from the upper left corner of an element.
      ElementOption withCoordinates​(org.openqa.selenium.Point offset)
      It defines x and y offset from the upper left corner of an element.
      ElementOption withElement​(org.openqa.selenium.WebElement element)
      This method sets the element as an option.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ElementOption

        public ElementOption()
    • Method Detail

      • element

        public static ElementOption element​(org.openqa.selenium.WebElement element,
                                            org.openqa.selenium.Point offset)
        This method creates a build instance of the ElementOption.
        Parameters:
        element - is the element to calculate offset from.
        offset - is the offset from the upper left corner of the given element.
        Returns:
        the built option
      • element

        public static ElementOption element​(org.openqa.selenium.WebElement element,
                                            int x,
                                            int y)
        This method creates a build instance of the ElementOption.
        Parameters:
        element - is the element to calculate offset from.
        x - is the x-offset from the upper left corner of the given element.
        y - is the y-offset from the upper left corner of the given element.
        Returns:
        the built option
      • element

        public static ElementOption element​(org.openqa.selenium.WebElement element)
        This method creates a build instance of the ElementOption.
        Parameters:
        element - is the element to calculate offset from.
        Returns:
        the built option
      • withCoordinates

        public ElementOption withCoordinates​(org.openqa.selenium.Point offset)
        It defines x and y offset from the upper left corner of an element.
        Overrides:
        withCoordinates in class PointOption<ElementOption>
        Parameters:
        offset - is the offset from the upper left corner of the given element.
        Returns:
        self-reference
      • withCoordinates

        public ElementOption withCoordinates​(int xOffset,
                                             int yOffset)
        It defines x and y offset from the upper left corner of an element.
        Overrides:
        withCoordinates in class PointOption<ElementOption>
        Parameters:
        xOffset - is the x-offset from the upper left corner of the given element.
        yOffset - is the y-offset from the upper left corner of the given element.
        Returns:
        self-reference
      • withElement

        public ElementOption withElement​(org.openqa.selenium.WebElement element)
        This method sets the element as an option. It means that x/y offset is the offset from the upper left corner of the given element.
        Parameters:
        element - is the element to calculate offset from.
        Returns:
        self-reference
      • verify

        protected void verify()
        Description copied from class: ActionOptions
        This method is automatically called before building options map to verify the consistency of the instance.
        Overrides:
        verify in class PointOption<ElementOption>
      • build

        public java.util.Map<java.lang.String,​java.lang.Object> build()
        Description copied from class: ActionOptions
        Creates a map based on the provided options.
        Overrides:
        build in class PointOption<ElementOption>
        Returns:
        options mapping.