Class SwingElementState


  • public class SwingElementState
    extends Object
    • Constructor Detail

      • SwingElementState

        public SwingElementState​(UiElement uiElement)
        Parameters:
        uiElement - the element of interest
    • Method Detail

      • verifyExist

        public void verifyExist()
        Verifies the element exist
        Throws:
        VerificationException - if the verification fails
      • verifyNotExist

        public void verifyNotExist()
        Verifies the element does NOT exist
        Throws:
        VerificationException - if the verification fails
      • verifyVisible

        public void verifyVisible()
        Verifies the element is visible
        Throws:
        VerificationException - if the verification fails
      • verifyNotVisible

        public void verifyNotVisible()
        Verifies the element is not visible
        Throws:
        VerificationException - if the verification fails
      • verifyEnabled

        public void verifyEnabled()
        Verifies the element is enabled
        Throws:
        VerificationException - if the verification fails
      • verifyDisabled

        public void verifyDisabled()
        Verifies the element is disabled
        Throws:
        VerificationException - if the verification fails
      • verifyEditable

        public void verifyEditable()
        Verifies the element is editable
        Throws:
        VerificationException - if the verification fails
      • verifyNotEditable

        public void verifyNotEditable()
        Verifies the element is not editable
        Throws:
        VerificationException - if the verification fails
      • waitToBecomeVisible

        public void waitToBecomeVisible()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become visible
        Throws:
        VerificationException - if the element does not become visible for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeNotVisible

        public void waitToBecomeNotVisible()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become invisible
        Throws:
        VerificationException - if the element does not become invisible for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeEnabled

        public void waitToBecomeEnabled()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become enabled
        Throws:
        VerificationException - if the element does not become enabled for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeDisabled

        public void waitToBecomeDisabled()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become disabled
        Throws:
        VerificationException - if the element does not become disabled for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeExisting

        public void waitToBecomeExisting()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to become existing
        Throws:
        VerificationException - if the element does not become existing for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeExisting

        public void waitToBecomeExisting​(int millis)
        Waits for a period of time the element to become existing
        Parameters:
        millis - milliseconds to wait
        Throws:
        VerificationException - if the element does not become existing for the specified period
      • waitToBecomeNotExisting

        public void waitToBecomeNotExisting()
        Waits for a period of time (check the 'elementStateChangeDelay' property) the element to became non-existing
        Throws:
        VerificationException - if the element does not become non-existing for the default waiting period (check the 'elementStateChangeDelay' property)
      • waitToBecomeNotExisting

        public void waitToBecomeNotExisting​(int millis)
        Waits for a period of time the element to became non-existing
        Parameters:
        millis - milliseconds to wait
        Throws:
        VerificationException - if the element does not become non-existing for the specified period
      • waitToBecomeEnabled

        public void waitToBecomeEnabled​(int millis)
        Waits for a period of time the element to become enabled
        Parameters:
        millis - milliseconds to wait
        Throws:
        VerificationException - if the element does not become enabled for the specified period
      • waitToBecomeDisabled

        public void waitToBecomeDisabled​(int millis)
        Waits for a period of time the element to become disabled
        Parameters:
        millis - milliseconds to wait
        Throws:
        VerificationException - if the element does not become disabled for the specified period
      • isElementPresent

        public boolean isElementPresent()
        Check if the element presents or not
        Returns:
        if the element presents or not
      • isElementVisible

        public boolean isElementVisible()
        Check if the element is visible or not
        Returns:
        if the element is visible or not
      • isElementEnabled

        public boolean isElementEnabled()
        Check if the element is enabled or disabled
        Returns:
        if the element is enabled or disabled
      • isElementEditable

        public boolean isElementEditable()
        Check if the element is editable or not
        Returns:
        if the element is editable or not