Class RealHtmlElement
- java.lang.Object
-
- com.axway.ats.uiengine.elements.UiElement
-
- com.axway.ats.uiengine.elements.html.HtmlElement
-
- com.axway.ats.uiengine.elements.html.realbrowser.RealHtmlElement
-
public class RealHtmlElement extends HtmlElement
Used to represent generic HTML element (tag). It could be used to work with generic elements likespan,div, etc.For more info check documentation of
HtmlElement
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]RULES_DUMMYused by all HiddenHtmlXYZ classes for passing it to UiElementProperties's method checkTypeAndRules()-
Fields inherited from class com.axway.ats.uiengine.elements.UiElement
log, properties
-
-
Constructor Summary
Constructors Constructor Description RealHtmlElement(UiDriver uiDriver, UiElementProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclick()Simulate mouse click actionvoiddoubleClick()Simulate mouse double click actionvoiddragAndDropTo(HtmlElement targetElement)Drag and drop an element on top of other elementStringgetAttributeValue(String attribute)Get element attribute valueStringgetCssPropertyValue(String propertyName)Get CSS property valueStringgetTextContent()Get innerText of the elementvoidmouseOver()Simulate mouse overvoidpressEnterKey()Simulate Enter keyvoidpressEscapeKey()Simulate Escape keyvoidpressSpaceKey()Simulate Space keyvoidpressTabKey()Simulate Tab keyvoidrightClick()Simulate mouse right click actionvoidscrollTo()Scroll to this element, so it is viewable.voidsetTextContent(String content)Set the content of the element-
Methods inherited from class com.axway.ats.uiengine.elements.UiElement
checkTypeAndRules, getElementProperties, getElementProperty, getPropertyNamesToUseForMatch, getUiDriver, logAction, toString
-
-
-
-
Field Detail
-
RULES_DUMMY
protected static final String[] RULES_DUMMY
used by all HiddenHtmlXYZ classes for passing it to UiElementProperties's method checkTypeAndRules()
-
-
Constructor Detail
-
RealHtmlElement
public RealHtmlElement(UiDriver uiDriver, UiElementProperties properties)
-
-
Method Detail
-
getAttributeValue
public String getAttributeValue(String attribute)
Get element attribute value- Specified by:
getAttributeValuein classHtmlElement- Returns:
- value of the attribute (style/class/...)
-
getCssPropertyValue
public String getCssPropertyValue(String propertyName)
Get CSS property value- Specified by:
getCssPropertyValuein classHtmlElement- Parameters:
propertyName- CSS property name- Returns:
- the value of the target CSS property
-
getTextContent
public String getTextContent()
Get innerText of the element- Specified by:
getTextContentin classHtmlElement- Returns:
- innerText of the element
-
setTextContent
public void setTextContent(String content)
Set the content of the element- Specified by:
setTextContentin classHtmlElement- Parameters:
content- the new content
-
click
public void click()
Simulate mouse click action- Specified by:
clickin classHtmlElement
-
doubleClick
public void doubleClick()
Simulate mouse double click action- Specified by:
doubleClickin classHtmlElement
-
rightClick
public void rightClick()
Simulate mouse right click action- Specified by:
rightClickin classHtmlElement
-
mouseOver
public void mouseOver()
Simulate mouse over- Specified by:
mouseOverin classHtmlElement
-
pressEnterKey
public void pressEnterKey()
Simulate Enter key- Specified by:
pressEnterKeyin classHtmlElement
-
pressSpaceKey
public void pressSpaceKey()
Simulate Space key- Specified by:
pressSpaceKeyin classHtmlElement
-
pressTabKey
public void pressTabKey()
Simulate Tab key- Specified by:
pressTabKeyin classHtmlElement
-
pressEscapeKey
public void pressEscapeKey()
Simulate Escape key- Specified by:
pressEscapeKeyin classHtmlElement
-
dragAndDropTo
public void dragAndDropTo(HtmlElement targetElement)
Drag and drop an element on top of other element- Specified by:
dragAndDropToin classHtmlElement- Parameters:
targetElement- the target element
-
scrollTo
public void scrollTo()
Scroll to this element, so it is viewable. Should be used when working in large pages where scrolling is possible and needed.
-
-