public class ElementOption extends PointOption<ElementOption>
coordinates| Constructor and Description |
|---|
ElementOption() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
build()
Creates a map based on the provided options.
|
static ElementOption |
element(WebElement element)
This method creates a build instance of the
ElementOption. |
static ElementOption |
element(WebElement element,
int x,
int y)
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 |
withElement(WebElement element)
This method sets the element as an option.
|
pointpublic static ElementOption element(WebElement element, int x, int y)
ElementOption.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.public static ElementOption element(WebElement element)
ElementOption.element - is the element to calculate offset from.public ElementOption withCoordinates(int xOffset, int yOffset)
withCoordinates in class PointOption<ElementOption>xOffset - is x value.yOffset - is y value.public ElementOption withElement(WebElement element)
element - is the element to calculate offset from.protected void verify()
ActionOptionsverify in class PointOption<ElementOption>public java.util.Map<java.lang.String,java.lang.Object> build()
ActionOptionsbuild in class PointOption<ElementOption>