Class RealHtmlElementState
- java.lang.Object
-
- com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState
-
- All Implemented Interfaces:
IHtmlElementState
public class RealHtmlElementState extends Object implements IHtmlElementState
Check the state of an HTML element
-
-
Constructor Summary
Constructors Constructor Description RealHtmlElementState(UiElement uiElement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
focus()
Moves the focus to the specified element.void
highlightElement()
Tries to briefly change the element's background color to yellow.boolean
isElementDisplayed()
Check whether the element is displayed or notboolean
isElementEnabled()
boolean
isElementPresent()
void
verifyExist()
Verifies the element exist throws an exception if verification failvoid
verifyNotExist()
Verifies the element does NOT exist throws an exception if verification failvoid
waitToBecomeDisabled()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become disabled throws an exception if it does not become disabled for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeDisabled(int millis)
Waits for a period of time the element to become disabled throws an exception if it does not become disabled for the specified periodvoid
waitToBecomeDisplayed()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become displayed throws an exception if it does not become displayed for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeDisplayed(int millis)
Waits for a period of time the element to become displayed throws an exception if it does not become displayed for the specified periodvoid
waitToBecomeEnabled()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become enabled throws an exception if it does not become enabled for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeEnabled(int millis)
Waits for a period of time the element to become enabled throws an exception if it does not become enabled for the specified periodvoid
waitToBecomeExisting()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become existing throws an exception if it does not become existing for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeExisting(int millis)
Waits for a period of time the element to become existing throws an exception if it does not become existing for the specified periodvoid
waitToBecomeHidden()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become hidden throws an exception if it does not become hidden for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeHidden(int millis)
Waits for a period of time the element to become hidden throws an exception if it does not become hidden for the specified periodvoid
waitToBecomeNotExisting()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to became non-existing throws an exception if it does not become non-existing for the default waiting period (check the 'elementStateChangeDelay' property)void
waitToBecomeNotExisting(int millis)
Waits for a period of time the element to became non-existing throws an exception if it does not become non-existing for the specified period
-
-
-
Constructor Detail
-
RealHtmlElementState
public RealHtmlElementState(UiElement uiElement)
- Parameters:
uiElement
- the element of interest
-
-
Method Detail
-
focus
public void focus()
Moves the focus to the specified element. Note: This is somewhat breakable as the browser window needs to be the active system window, otherwise the keyboard events will go to another application.- Specified by:
focus
in interfaceIHtmlElementState
-
verifyExist
public void verifyExist()
Verifies the element exist throws an exception if verification fail- Specified by:
verifyExist
in interfaceIHtmlElementState
-
verifyNotExist
public void verifyNotExist()
Verifies the element does NOT exist throws an exception if verification fail- Specified by:
verifyNotExist
in interfaceIHtmlElementState
-
waitToBecomeExisting
public void waitToBecomeExisting()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become existing throws an exception if it does not become existing for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeExisting
in interfaceIHtmlElementState
-
waitToBecomeExisting
public void waitToBecomeExisting(int millis)
Waits for a period of time the element to become existing throws an exception if it does not become existing for the specified period- Specified by:
waitToBecomeExisting
in interfaceIHtmlElementState
-
waitToBecomeNotExisting
public void waitToBecomeNotExisting()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to became non-existing throws an exception if it does not become non-existing for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeNotExisting
in interfaceIHtmlElementState
-
waitToBecomeNotExisting
public void waitToBecomeNotExisting(int millis)
Waits for a period of time the element to became non-existing throws an exception if it does not become non-existing for the specified period- Specified by:
waitToBecomeNotExisting
in interfaceIHtmlElementState
-
waitToBecomeDisplayed
public void waitToBecomeDisplayed()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become displayed throws an exception if it does not become displayed for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeDisplayed
in interfaceIHtmlElementState
-
waitToBecomeDisplayed
public void waitToBecomeDisplayed(int millis)
Waits for a period of time the element to become displayed throws an exception if it does not become displayed for the specified period- Specified by:
waitToBecomeDisplayed
in interfaceIHtmlElementState
-
waitToBecomeHidden
public void waitToBecomeHidden()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become hidden throws an exception if it does not become hidden for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeHidden
in interfaceIHtmlElementState
-
waitToBecomeHidden
public void waitToBecomeHidden(int millis)
Waits for a period of time the element to become hidden throws an exception if it does not become hidden for the specified period- Specified by:
waitToBecomeHidden
in interfaceIHtmlElementState
-
waitToBecomeEnabled
public void waitToBecomeEnabled()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become enabled throws an exception if it does not become enabled for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeEnabled
in interfaceIHtmlElementState
-
waitToBecomeEnabled
public void waitToBecomeEnabled(int millis)
Waits for a period of time the element to become enabled throws an exception if it does not become enabled for the specified period- Specified by:
waitToBecomeEnabled
in interfaceIHtmlElementState
-
waitToBecomeDisabled
public void waitToBecomeDisabled()
Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become disabled throws an exception if it does not become disabled for the default waiting period (check the 'elementStateChangeDelay' property)- Specified by:
waitToBecomeDisabled
in interfaceIHtmlElementState
-
waitToBecomeDisabled
public void waitToBecomeDisabled(int millis)
Waits for a period of time the element to become disabled throws an exception if it does not become disabled for the specified period- Specified by:
waitToBecomeDisabled
in interfaceIHtmlElementState
-
highlightElement
public void highlightElement()
Tries to briefly change the element's background color to yellow. Does not work on all elements. It is useful for debugging purposes.- Specified by:
highlightElement
in interfaceIHtmlElementState
-
isElementPresent
public boolean isElementPresent()
- Specified by:
isElementPresent
in interfaceIHtmlElementState
- Returns:
true
if the element exists
-
isElementEnabled
public boolean isElementEnabled()
- Specified by:
isElementEnabled
in interfaceIHtmlElementState
- Returns:
true
if the element is enabled
-
isElementDisplayed
public boolean isElementDisplayed()
Check whether the element is displayed or not- Specified by:
isElementDisplayed
in interfaceIHtmlElementState
- Returns:
true
if the element is displayed
-
-