Package core.helpers
Class ElementHelper
java.lang.Object
core.helpers.ElementHelper
app page is parent class of different apps
- Author:
- ehsan matean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]findMiddleOfElement(EnhancedBy target) returns the center coordinates of the target elementstatic StringgetAttribute(EnhancedBy byValue, int index, String attribute) gets specified attribute of the element based on indexstatic StringgetAttribute(EnhancedBy byValue, String attribute) gets specified attribute of the elementstatic org.openqa.selenium.Pointget element position on displaystatic org.openqa.selenium.PointgetElementPosition(EnhancedBy by, int index) get element position on displaystatic org.openqa.selenium.Dimensionreturns element dimensionstatic booleanisAttributeContaining(EnhancedBy by, String attribute, String value) returns true if element contains class valuestatic booleanisElementContainingClass(EnhancedBy by, String value) static voidsetAttribute(EnhancedBy by, int index, String attribute, String value) sets attribute value of an elementstatic voidsetAttribute(EnhancedBy by, String attribute, String value) sets attribute value of an element
-
Constructor Details
-
ElementHelper
public ElementHelper()
-
-
Method Details
-
getAttribute
gets specified attribute of the element- Parameters:
byValue-attribute-index-
-
getAttribute
gets specified attribute of the element based on index- Parameters:
byValue-index-attribute-
-
isElementContainingClass
-
isAttributeContaining
returns true if element contains class value- Parameters:
by-classValue-- Returns:
-
setAttribute
sets attribute value of an element- Parameters:
by-attribute-value-
-
setAttribute
sets attribute value of an element- Parameters:
by-index-attribute-value-
-
getElementSize
returns element dimension- Parameters:
by-- Returns:
-
getElementPosition
get element position on display- Parameters:
by-- Returns:
-
getElementPosition
get element position on display- Parameters:
by-index-- Returns:
-
findMiddleOfElement
returns the center coordinates of the target element- Parameters:
target-- Returns:
-