public class ElementHelper extends Object
| Constructor and Description |
|---|
ElementHelper() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
findMiddleOfElement(EnhancedBy target)
returns the center coordinates of the target element
|
static String |
getAttribute(EnhancedBy byValue,
int index,
String attribute)
gets specified attribute of the element based on index
|
static String |
getAttribute(EnhancedBy byValue,
String attribute)
gets specified attribute of the element
|
static org.openqa.selenium.Point |
getElementPosition(EnhancedBy by)
get element position on display
|
static org.openqa.selenium.Point |
getElementPosition(EnhancedBy by,
int index)
get element position on display
|
static org.openqa.selenium.Dimension |
getElementSize(EnhancedBy by)
returns element dimension
|
static boolean |
isAttributeContaining(EnhancedBy by,
String attribute,
String value)
returns true if element contains class value
|
static boolean |
isElementContainingClass(EnhancedBy by,
String value) |
static void |
setAttribute(EnhancedBy by,
int index,
String attribute,
String value)
sets attribute value of an element
|
static void |
setAttribute(EnhancedBy by,
String attribute,
String value)
sets attribute value of an element
|
public static String getAttribute(EnhancedBy byValue, String attribute)
byValue - index - attribute - public static String getAttribute(EnhancedBy byValue, int index, String attribute)
byValue - index - attribute - public static boolean isElementContainingClass(EnhancedBy by, String value)
public static boolean isAttributeContaining(EnhancedBy by, String attribute, String value)
by - classValue - public static void setAttribute(EnhancedBy by, String attribute, String value)
by - attribute - value - public static void setAttribute(EnhancedBy by, int index, String attribute, String value)
by - index - attribute - value - public static org.openqa.selenium.Dimension getElementSize(EnhancedBy by)
by - public static org.openqa.selenium.Point getElementPosition(EnhancedBy by)
by - public static org.openqa.selenium.Point getElementPosition(EnhancedBy by, int index)
by - index - public static int[] findMiddleOfElement(EnhancedBy target)
target - Copyright © 2022. All rights reserved.