Class AbstractHtmlUnitScriptAction


  • public abstract class AbstractHtmlUnitScriptAction
    extends AbstractHtmlPageAction
    Base class of HTML page actions supporting script commands.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected HtmlPage addSelection​(java.lang.String select, java.lang.String option)
      Adds the given option of the given select to the current selection.
      protected void assertAttribute​(java.lang.String attributeLocator, java.lang.String textPattern)
      Asserts that the value of the attribute identified by the given attribute locator matches the given text pattern.
      protected void assertAttribute​(java.lang.String elementLocator, java.lang.String attributeName, java.lang.String textPattern)
      Asserts that the value of the attribute identified by the given element locator and attribute name matches the given text pattern.
      protected void assertChecked​(java.lang.String elementLocator)
      Asserts that the given checkbox/radio button is checked.
      protected void assertClass​(java.lang.String elementLocator, java.lang.String clazzString)
      Asserts that the given element has the given class(es).
      protected void assertElementCount​(java.lang.String elementLocator, int count)
      Asserts that the number of elements found by using the given element locator is equal to the given count.
      protected void assertElementCount​(java.lang.String elementLocator, java.lang.String count)
      Asserts that the number of elements found by using the given element locator is equal to the given count.
      protected void assertElementPresent​(java.lang.String elementLocator)
      Asserts that the given element is present.
      protected void assertEval​(java.lang.String expression, java.lang.String textPattern)
      Asserts that evaluating the given expression matches the given text pattern.
      protected void assertLoadTime​(long loadTime)
      Asserts that the time needed to load a does not exceed the given value.
      protected void assertLoadTime​(java.lang.String loadTime)
      Asserts that the time needed to load a does not exceed the given value.
      protected void assertNotAttribute​(java.lang.String attributeLocator, java.lang.String textPattern)
      Asserts that the value of the attribute identified by the given attribute locator does NOT match the given text pattern.
      protected void assertNotAttribute​(java.lang.String elementLocator, java.lang.String attributeName, java.lang.String textPattern)
      Asserts that the value of the attribute identified by the given element locator and attribute name does NOT match the given text pattern.
      protected void assertNotChecked​(java.lang.String elementLocator)
      Asserts that the given checkbox/radio button is unchecked.
      protected void assertNotClass​(java.lang.String elementLocator, java.lang.String clazzString)
      Asserts that the given element doesn't have the given class(es).
      protected void assertNotElementCount​(java.lang.String elementLocator, int count)
      Asserts that the number of elements found by using the given element locator is unequal to the given count.
      protected void assertNotElementCount​(java.lang.String elementLocator, java.lang.String count)
      Asserts that the number of elements found by using the given element locator is unequal to the given count.
      protected void assertNotElementPresent​(java.lang.String elementLocator)
      Asserts that the given element is not present.
      protected void assertNotEval​(java.lang.String expression, java.lang.String textPattern)
      Asserts that evaluating the given expression does NOT match the given text pattern.
      protected void assertNotSelectedId​(java.lang.String selectLocator, java.lang.String idPattern)
      Asserts that no ID of all selected options of the given select element matches the given pattern.
      protected void assertNotSelectedIndex​(java.lang.String selectLocator, java.lang.String indexPattern)
      Asserts that the option of the given select element at the given index is not selected.
      protected void assertNotSelectedLabel​(java.lang.String selectLocator, java.lang.String labelPattern)
      Asserts that no label of all selected options of the given select element matches the given pattern.
      protected void assertNotSelectedValue​(java.lang.String selectLocator, java.lang.String valuePattern)
      Asserts that no value of all selected options of the given select element matches the given pattern.
      protected void assertNotStyle​(java.lang.String elementLocator, java.lang.String styleText)
      Asserts that the effective style of the element identified by the given element locator does NOT match the given style.
      protected void assertNotText​(java.lang.String elementLocator, java.lang.String text)
      Asserts that the embedded text of the given element does not contain the given text.
      protected void assertNotTextPresent​(java.lang.String text)
      Asserts that the given text is not present on the .
      protected void assertNotTitle​(java.lang.String title)
      Asserts that the title does not match the given title.
      protected void assertNotValue​(java.lang.String elementLocator, java.lang.String value)
      Asserts that the value of the given element doesn't match the given value.
      protected void assertNotVisible​(java.lang.String elementLocator)
      Asserts that the given element is invisible.
      protected void assertNotXpathCount​(java.lang.String xpath, int count)
      Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.
      protected void assertNotXpathCount​(java.lang.String xpath, java.lang.String count)
      Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.
      protected void assertPageSize​(long pageSize)
      Asserts that the size of the actual (including images etc.) does not exceed the given value.
      protected void assertPageSize​(java.lang.String pageSize)
      Asserts that the size of the actual (including images etc.) does not exceed the given value.
      protected void assertSelectedId​(java.lang.String selectLocator, java.lang.String idPattern)
      Asserts that the ID of at least one selected option of the given select element matches the given pattern.
      protected void assertSelectedIndex​(java.lang.String selectLocator, java.lang.String indexPattern)
      Asserts that the option of the given select element at the given index is selected.
      protected void assertSelectedLabel​(java.lang.String selectLocator, java.lang.String labelPattern)
      Asserts that the label of at least one selected option of the given select element matches the given pattern.
      protected void assertSelectedValue​(java.lang.String selectLocator, java.lang.String valuePattern)
      Asserts that the value of at least one selected option of the given select element matches the given pattern.
      protected void assertStyle​(java.lang.String elementLocator, java.lang.String styleText)
      Asserts that the effective style of the element identified by the given element locator matches the given style.
      protected void assertText​(java.lang.String elementLocator, java.lang.String text)
      Asserts that the text embedded by the given element contains the given text.
      protected void assertTextPresent​(java.lang.String text)
      Asserts that the given text is present.
      protected void assertTitle​(java.lang.String title)
      Asserts that the given title matches the title.
      protected void assertValue​(java.lang.String elementLocator, java.lang.String value)
      Asserts that the value of the given element matches the given value.
      protected void assertVisible​(java.lang.String elementLocator)
      Asserts that the given element is visible.
      protected void assertXpathCount​(java.lang.String xpath, int count)
      Asserts that the number of elements locatable by the given XPath expression is equal to the given count.
      protected void assertXpathCount​(java.lang.String xpath, java.lang.String count)
      Asserts that the number of elements locatable by the given XPath expression is equal to the given count.
      protected HtmlPage check​(java.lang.String elementLocator)
      Checks/toggles the given element.
      protected HtmlPage checkAndWait​(java.lang.String elementLocator)
      Checks/toggles the given element and waits for some activity to complete.
      protected HtmlPage click​(java.lang.String elementLocator)
      Clicks the given element.
      protected HtmlPage clickAndWait​(java.lang.String elementLocator)
      Clicks the given element and waits for some activity to complete.
      protected void close()
      Closes the current window if it is a top-level window.
      protected HtmlPage contextMenu​(java.lang.String elementLocator)
      Simulates a right-click on the given element.
      protected HtmlPage contextMenuAt​(java.lang.String elementLocator, int coordX, int coordY)
      Simulates a right-click at the given coordinates (relative to the given element).
      protected HtmlPage contextMenuAt​(java.lang.String elementLocator, java.lang.String coordinates)
      Simulates a right-click at the given coordinates (relative to the given element).
      protected void createCookie​(java.lang.String cookie)
      Creates a new cookie.
      protected void createCookie​(java.lang.String cookie, java.lang.String options)
      Creates a new cookie.
      protected void deleteAllVisibleCookies()
      Removes all cookies visible to the current .
      protected void deleteCookie​(java.lang.String name)
      Removes the cookie with the specified name.
      protected void deleteCookie​(java.lang.String name, java.lang.String options)
      Removes the cookie with the specified name.
      protected HtmlPage doubleClick​(java.lang.String elementLocator)
      Double-clicks the given element.
      protected HtmlPage doubleClickAndWait​(java.lang.String elementLocator)
      Double-clicks the given element and waits for a page to be loaded.
      protected void echo​(java.lang.String message)
      Prints the given message to the log.
      protected boolean evaluatesToTrue​(java.lang.String jsExpression)
      Returns whether or not the given expression evaluates to true.
      protected java.lang.String getBaseUrl()
      Returns the configured base URL as string.
      protected HtmlPage mouseDown​(java.lang.String elementLocator)
      Presses the left mouse button on an element, but does not release the button yet.
      protected HtmlPage mouseDownAt​(java.lang.String elementLocator, int coordX, int coordY)
      Presses the left mouse button at the given coordinates (relative to the given element), but does not release the button yet.
      protected HtmlPage mouseDownAt​(java.lang.String elementLocator, java.lang.String coordinates)
      Presses the left mouse button at the given coordinates (relative to the given element), but does not release the button yet.
      protected HtmlPage mouseMove​(java.lang.String elementLocator)
      Moves the mouse to the given element.
      protected HtmlPage mouseMoveAt​(java.lang.String elementLocator, int coordX, int coordY)
      Moves the mouse to the given coordinates (relative to the given element).
      protected HtmlPage mouseMoveAt​(java.lang.String elementLocator, java.lang.String coordinates)
      Moves the mouse to the given coordinates (relative to the given element).
      protected HtmlPage mouseOut​(java.lang.String elementLocator)
      Moves the mouse out of the element's bounding box.
      protected HtmlPage mouseOver​(java.lang.String elementLocator)
      Hovers the mouse over an element.
      protected HtmlPage mouseUp​(java.lang.String elementLocator)
      Releases the left mouse button on an element.
      protected HtmlPage mouseUpAt​(java.lang.String elementLocator, int coordX, int coordY)
      Releases the left mouse button at the given coordinates (relative to the given element).
      protected HtmlPage mouseUpAt​(java.lang.String elementLocator, java.lang.String coordinates)
      Releases the left mouse button at the given coordinates (relative to the given element).
      protected HtmlPage open​(java.lang.String urlToOpen)
      Opens the given URL.
      protected HtmlPage open​(java.net.URL urlToOpen)
      Opens the given URL.
      protected HtmlPage pause​(long waitingTime)
      Waits the given time.
      protected HtmlPage pause​(java.lang.String waitingTime)
      Waits the given time.
      protected HtmlPage removeSelection​(java.lang.String select, java.lang.String option)
      Removes the given option of the given select from the current selection.
      protected java.lang.String resolve​(java.lang.String resolvable)
      Resolves the given string.
      protected java.lang.String resolveKey​(java.lang.String key)
      Resolves the given test data key.
      protected HtmlPage select​(java.lang.String select, java.lang.String option)
      Selects the given option of the given select.
      protected HtmlPage selectAndWait​(java.lang.String select, java.lang.String option)
      Selects the given option of the given select and waits for some activity to complete.
      protected HtmlPage selectFrame​(java.lang.String frameTarget)
      Selects the given frame.
      protected HtmlPage selectWindow()
      Selects the top-level window.
      protected HtmlPage selectWindow​(java.lang.String windowTarget)
      Selects the given window.
      protected void setTimeout​(long timeout)
      Sets the timeout to the given value.
      protected void setTimeout​(java.lang.String timeout)
      Sets the timeout to the given value.
      protected void store​(java.lang.String text, java.lang.String variableName)
      Stores the given text to the given variable.
      protected void storeAttribute​(java.lang.String attributeLocator, java.lang.String variableName)
      Stores the value of the attribute identified by the given attribute locator to the given variable
      protected void storeAttribute​(java.lang.String elementLocator, java.lang.String attributeName, java.lang.String variableName)
      Stores the value of the given element and attribute to the given variable.
      protected void storeElementCount​(java.lang.String elementLocator, java.lang.String variableName)
      Stores that the number of elements found by using the given element locator to the given variable.
      protected void storeEval​(java.lang.String expression, java.lang.String variableName)
      Stores the result of evaluating the given expression to the given variable.
      protected void storeText​(java.lang.String elementLocator, java.lang.String variableName)
      Stores the text of the element identified by the given locator to the given variable.
      protected void storeTitle​(java.lang.String variableName)
      Stores the title of the currently active document to the given variable.
      protected void storeValue​(java.lang.String elementLocator, java.lang.String variableName)
      Stores the value (in case of a <textarea> the contained text) of the element identified by the given locator to the given variable.
      protected void storeXpathCount​(java.lang.String xpath, java.lang.String variableName)
      Stores the number of elements matching the given XPath expression to the given variable.
      protected HtmlPage submit​(java.lang.String form)
      Submits the given form.
      protected HtmlPage submitAndWait​(java.lang.String form)
      Submits the given form and waits for some activity to complete.
      protected HtmlPage type​(java.lang.String elementLocator, java.lang.String text)
      Types the given text into the given input field.
      protected HtmlPage typeAndWait​(java.lang.String elementLocator, java.lang.String text)
      Types the given text into the given input field and waits for some activity to complete.
      protected HtmlPage uncheck​(java.lang.String elementLocator)
      Unchecks the given checkbox/radio button.
      protected HtmlPage uncheckAndWait​(java.lang.String elementLocator)
      Unchecks the given checkbox/radio button and waits for a load.
      protected HtmlPage waitForAttribute​(java.lang.String attributeLocator, java.lang.String textPattern)
      Waits until the value of the attribute identified by the given attribute locator matches the given text pattern.
      protected HtmlPage waitForAttribute​(java.lang.String elementLocator, java.lang.String attributeName, java.lang.String textPattern)
      Waits until the value of the given element and attribute matches the given text pattern.
      protected HtmlPage waitForChecked​(java.lang.String elementLocator)
      Waits until the given checkbox/radio button becomes checked.
      protected HtmlPage waitForClass​(java.lang.String elementLocator, java.lang.String clazzString)
      Waits until the given element has the given class(es).
      protected HtmlPage waitForElementCount​(java.lang.String elementLocator, int count)
      Waits until the number of elements found by using the given element locator is equal to the given count.
      protected HtmlPage waitForElementCount​(java.lang.String elementLocator, java.lang.String count)
      Waits until the number of elements found by using the given element locator is equal to the given count.
      protected HtmlPage waitForElementPresent​(java.lang.String elementLocator)
      Waits for the given element to appear.
      protected HtmlPage waitForEval​(java.lang.String expression, java.lang.String textPattern)
      Waits until the result of evaluating the given expression matches the given text pattern.
      protected HtmlPage waitForNotAttribute​(java.lang.String attributeLocator, java.lang.String textPattern)
      Waits until the value of the attribute identified by the given attribute locator does NOT match the given text pattern.
      protected HtmlPage waitForNotAttribute​(java.lang.String elementLocator, java.lang.String attributeName, java.lang.String textPattern)
      Waits until the value of the given element and attribute does NOT match the given text pattern.
      protected HtmlPage waitForNotChecked​(java.lang.String elementLocator)
      Waits until the given checkbox/radio button becomes unchecked.
      protected HtmlPage waitForNotClass​(java.lang.String elementLocator, java.lang.String clazzString)
      Waits until the given element doesn't have the given class(es).
      protected HtmlPage waitForNotElementCount​(java.lang.String elementLocator, int count)
      Waits until the number of elements found by using the given element locator is unequal to the given count.
      protected HtmlPage waitForNotElementCount​(java.lang.String elementLocator, java.lang.String count)
      Waits until the number of elements found by using the given element locator is unequal to the given count.
      protected HtmlPage waitForNotElementPresent​(java.lang.String elementLocator)
      Waits for the given element to disappear.
      protected HtmlPage waitForNotEval​(java.lang.String expression, java.lang.String textPattern)
      Waits until the result of evaluating the given expression does NOT match the given text pattern.
      protected HtmlPage waitForNotSelectedId​(java.lang.String selectLocator, java.lang.String idPattern)
      Waits until no ID of all selected options of the given select element matches the given pattern.
      protected HtmlPage waitForNotSelectedIndex​(java.lang.String selectLocator, java.lang.String indexPattern)
      Waits until the option of the given select element at the given index is not selected.
      protected HtmlPage waitForNotSelectedLabel​(java.lang.String selectLocator, java.lang.String labelPattern)
      Waits until no label of all selected options of the given select element matches the given pattern.
      protected HtmlPage waitForNotSelectedValue​(java.lang.String selectLocator, java.lang.String valuePattern)
      Waits until no value of all selected options of the given select element matches the given pattern.
      protected HtmlPage waitForNotStyle​(java.lang.String elementLocator, java.lang.String styleText)
      Waits until the effective style of the element identified by the given element locator does NOT match the given style.
      protected HtmlPage waitForNotText​(java.lang.String elementLocator, java.lang.String text)
      Waits for the given text embedded in the given element to disappear/change.
      protected HtmlPage waitForNotTextPresent​(java.lang.String text)
      Waits for the given text to disappear/change.
      protected HtmlPage waitForNotTitle​(java.lang.String title)
      Waits for the given title change.
      protected HtmlPage waitForNotValue​(java.lang.String elementLocator, java.lang.String value)
      Waits for the given value in the given element to disappear/change.
      protected HtmlPage waitForNotVisible​(java.lang.String elementLocator)
      Waits for the given element to become invisible.
      protected HtmlPage waitForNotXpathCount​(java.lang.String xpath, int count)
      Waits for the number of elements matching the given XPath expression change to a different value than the given one.
      protected HtmlPage waitForNotXpathCount​(java.lang.String xpath, java.lang.String count)
      Waits for the number of elements matching the given XPath expression change to a different value than the given one.
      protected HtmlPage waitForPageToLoad()
      Waits for the page to load.
      protected void waitForPopUp()
      Waits for any pop-up window to be loaded completely.
      protected void waitForPopUp​(java.lang.String windowID)
      Waits for some pop-up window to be loaded completely.
      protected void waitForPopUp​(java.lang.String windowID, long maxWaitingTime)
      Waits at most the given time for some pop-up window to be loaded completely.
      protected void waitForPopUp​(java.lang.String windowID, java.lang.String maxWaitingTime)
      Waits at most the given time for some pop-up window to be loaded completely.
      protected HtmlPage waitForSelectedId​(java.lang.String selectLocator, java.lang.String idPattern)
      Waits until the ID of at least one selected option of the given select element matches the given pattern.
      protected HtmlPage waitForSelectedIndex​(java.lang.String selectLocator, java.lang.String indexPattern)
      Waits until the option of the given select element at the given index is selected.
      protected HtmlPage waitForSelectedLabel​(java.lang.String selectLocator, java.lang.String labelPattern)
      Waits until the label of at least one selected option of the given select element matches the given pattern.
      protected HtmlPage waitForSelectedValue​(java.lang.String selectLocator, java.lang.String valuePattern)
      Waits until the value of at least one selected option of the given select element matches the given pattern.
      protected HtmlPage waitForStyle​(java.lang.String elementLocator, java.lang.String styleText)
      Waits until the effective style of the element identified by the given element locator matches the given style.
      protected HtmlPage waitForText​(java.lang.String elementLocator, java.lang.String text)
      Waits for the given text embedded in the given element.
      protected HtmlPage waitForTextPresent​(java.lang.String text)
      Waits for the given text to appear.
      protected HtmlPage waitForTitle​(java.lang.String title)
      Waits for the given title.
      protected HtmlPage waitForValue​(java.lang.String elementLocator, java.lang.String value)
      Waits for the given value in the given element.
      protected HtmlPage waitForVisible​(java.lang.String elementLocator)
      Waits until the given element becomes visible.
      protected HtmlPage waitForXpathCount​(java.lang.String xpath, int count)
      Waits for the number of elements matching the given XPath expression is equal to the given count.
      protected HtmlPage waitForXpathCount​(java.lang.String xpath, java.lang.String count)
      Waits for the number of elements matching the given XPath expression is equal to the given count.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractHtmlUnitScriptAction

        public AbstractHtmlUnitScriptAction​(AbstractWebAction previousAction)
        Constructor.
        Parameters:
        previousAction - previous action
      • AbstractHtmlUnitScriptAction

        public AbstractHtmlUnitScriptAction​(AbstractWebAction prevAction,
                                            java.lang.String timerName)
        Constructor.
        Parameters:
        prevAction - previous action
        timerName - timer name
      • AbstractHtmlUnitScriptAction

        public AbstractHtmlUnitScriptAction​(java.lang.String timerName)
        Constructor.
        Parameters:
        timerName - timer name
    • Method Detail

      • addSelection

        protected HtmlPage addSelection​(java.lang.String select,
                                        java.lang.String option)
        Adds the given option of the given select to the current selection.
        Parameters:
        select - the select
        option - the option to be added to current selection
      • assertAttribute

        protected void assertAttribute​(java.lang.String attributeLocator,
                                       java.lang.String textPattern)
        Asserts that the value of the attribute identified by the given attribute locator matches the given text pattern.
        Parameters:
        attributeLocator - the attribute locator
        textPattern - the text pattern that the attribute value must match
      • assertAttribute

        protected void assertAttribute​(java.lang.String elementLocator,
                                       java.lang.String attributeName,
                                       java.lang.String textPattern)
        Asserts that the value of the attribute identified by the given element locator and attribute name matches the given text pattern.
        Parameters:
        elementLocator - the element locator
        attributeName - the name of the attribute
        textPattern - the text pattern that the attribute value must match
      • assertChecked

        protected void assertChecked​(java.lang.String elementLocator)
        Asserts that the given checkbox/radio button is checked.
        Parameters:
        elementLocator - the checkbox/radio button element locator
      • assertClass

        protected void assertClass​(java.lang.String elementLocator,
                                   java.lang.String clazzString)
        Asserts that the given element has the given class(es).
        Parameters:
        elementLocator - the element locator
        clazzString - the class(es) string
      • assertElementCount

        protected void assertElementCount​(java.lang.String elementLocator,
                                          int count)
        Asserts that the number of elements found by using the given element locator is equal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • assertElementCount

        protected void assertElementCount​(java.lang.String elementLocator,
                                          java.lang.String count)
        Asserts that the number of elements found by using the given element locator is equal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • assertElementPresent

        protected void assertElementPresent​(java.lang.String elementLocator)
        Asserts that the given element is present.
        Parameters:
        elementLocator - locator identifying the element that should be present
      • assertEval

        protected void assertEval​(java.lang.String expression,
                                  java.lang.String textPattern)
        Asserts that evaluating the given expression matches the given text pattern.
        Parameters:
        expression - the expression to evaluate
        textPattern - the text pattern that the evaluation result must match
      • assertLoadTime

        protected void assertLoadTime​(long loadTime)
        Asserts that the time needed to load a does not exceed the given value.
        Parameters:
        loadTime - maximum load time in milliseconds
      • assertLoadTime

        protected void assertLoadTime​(java.lang.String loadTime)
        Asserts that the time needed to load a does not exceed the given value.
        Parameters:
        loadTime - maximum load time in milliseconds
      • assertNotAttribute

        protected void assertNotAttribute​(java.lang.String attributeLocator,
                                          java.lang.String textPattern)
        Asserts that the value of the attribute identified by the given attribute locator does NOT match the given text pattern.
        Parameters:
        attributeLocator - the attribute locator
        textPattern - the text pattern that the attribute value must NOT match
      • assertNotAttribute

        protected void assertNotAttribute​(java.lang.String elementLocator,
                                          java.lang.String attributeName,
                                          java.lang.String textPattern)
        Asserts that the value of the attribute identified by the given element locator and attribute name does NOT match the given text pattern.
        Parameters:
        elementLocator - the element locator
        attributeName - the name of the attribute
        textPattern - the text pattern that the attribute value must NOT match
      • assertNotChecked

        protected void assertNotChecked​(java.lang.String elementLocator)
        Asserts that the given checkbox/radio button is unchecked.
        Parameters:
        elementLocator - the checkbox/radio button element locator
      • assertNotClass

        protected void assertNotClass​(java.lang.String elementLocator,
                                      java.lang.String clazzString)
        Asserts that the given element doesn't have the given class(es).
        Parameters:
        elementLocator - the element locator
        clazzString - the class(es) string
      • assertNotElementCount

        protected void assertNotElementCount​(java.lang.String elementLocator,
                                             int count)
        Asserts that the number of elements found by using the given element locator is unequal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • assertNotElementCount

        protected void assertNotElementCount​(java.lang.String elementLocator,
                                             java.lang.String count)
        Asserts that the number of elements found by using the given element locator is unequal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • assertNotElementPresent

        protected void assertNotElementPresent​(java.lang.String elementLocator)
        Asserts that the given element is not present.
        Parameters:
        elementLocator - locator identifying the element that should be NOT present
      • assertNotEval

        protected void assertNotEval​(java.lang.String expression,
                                     java.lang.String textPattern)
        Asserts that evaluating the given expression does NOT match the given text pattern.
        Parameters:
        expression - the expression to evaluate
        textPattern - the text pattern that the evaluation result must NOT match
      • assertNotSelectedId

        protected void assertNotSelectedId​(java.lang.String selectLocator,
                                           java.lang.String idPattern)
        Asserts that no ID of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        idPattern - the ID pattern
      • assertNotSelectedIndex

        protected void assertNotSelectedIndex​(java.lang.String selectLocator,
                                              java.lang.String indexPattern)
        Asserts that the option of the given select element at the given index is not selected.
        Parameters:
        selectLocator - the select element locator
        indexPattern - the option index pattern
      • assertNotSelectedLabel

        protected void assertNotSelectedLabel​(java.lang.String selectLocator,
                                              java.lang.String labelPattern)
        Asserts that no label of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        labelPattern - the label pattern
      • assertNotSelectedValue

        protected void assertNotSelectedValue​(java.lang.String selectLocator,
                                              java.lang.String valuePattern)
        Asserts that no value of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        valuePattern - the value pattern
      • assertNotStyle

        protected void assertNotStyle​(java.lang.String elementLocator,
                                      java.lang.String styleText)
        Asserts that the effective style of the element identified by the given element locator does NOT match the given style.
        Parameters:
        elementLocator - the element locator
        styleText - the style that must NOT match (e.g. width: 10px; overflow: hidden;)
      • assertNotText

        protected void assertNotText​(java.lang.String elementLocator,
                                     java.lang.String text)
        Asserts that the embedded text of the given element does not contain the given text.
        Parameters:
        elementLocator - locator identifying the element
        text - the text that should not be embedded in the given element
      • assertNotTextPresent

        protected void assertNotTextPresent​(java.lang.String text)
        Asserts that the given text is not present on the .
        Parameters:
        text - the text that should NOT be present
      • assertNotTitle

        protected void assertNotTitle​(java.lang.String title)
        Asserts that the title does not match the given title.
        Parameters:
        title - the title that should not match
      • assertNotValue

        protected void assertNotValue​(java.lang.String elementLocator,
                                      java.lang.String value)
        Asserts that the value of the given element doesn't match the given value. If the element is a <textarea> this method asserts that the containing text doesnt' match the given value.
        Parameters:
        elementLocator - locator identifying the element whose value doesn't match the given value
        value - the value that doesn't match the given element's value
      • assertNotVisible

        protected void assertNotVisible​(java.lang.String elementLocator)
        Asserts that the given element is invisible.
        Parameters:
        elementLocator - the element locator
      • assertNotXpathCount

        protected void assertNotXpathCount​(java.lang.String xpath,
                                           int count)
        Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements that should NOT be equal to the actual number of elements matching the given XPath expression
      • assertNotXpathCount

        protected void assertNotXpathCount​(java.lang.String xpath,
                                           java.lang.String count)
        Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements that should NOT be equal to the actual number of elements matching the given XPath expression
      • assertPageSize

        protected void assertPageSize​(long pageSize)
        Asserts that the size of the actual (including images etc.) does not exceed the given value.
        Parameters:
        pageSize - the number of bytes the size must not exceed
      • assertPageSize

        protected void assertPageSize​(java.lang.String pageSize)
        Asserts that the size of the actual (including images etc.) does not exceed the given value.
        Parameters:
        pageSize - the number of bytes the size must not exceed
      • assertSelectedId

        protected void assertSelectedId​(java.lang.String selectLocator,
                                        java.lang.String idPattern)
        Asserts that the ID of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        idPattern - the ID pattern
      • assertSelectedIndex

        protected void assertSelectedIndex​(java.lang.String selectLocator,
                                           java.lang.String indexPattern)
        Asserts that the option of the given select element at the given index is selected.
        Parameters:
        selectLocator - the select element locator
        indexPattern - the option index pattern
      • assertSelectedLabel

        protected void assertSelectedLabel​(java.lang.String selectLocator,
                                           java.lang.String labelPattern)
        Asserts that the label of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        labelPattern - the label pattern that must match
      • assertSelectedValue

        protected void assertSelectedValue​(java.lang.String selectLocator,
                                           java.lang.String valuePattern)
        Asserts that the value of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        valuePattern - the value pattern that must match
      • assertStyle

        protected void assertStyle​(java.lang.String elementLocator,
                                   java.lang.String styleText)
        Asserts that the effective style of the element identified by the given element locator matches the given style.
        Parameters:
        elementLocator - the element locator
        styleText - the style to match (e.g. width: 10px; overflow: hidden;)
      • assertText

        protected void assertText​(java.lang.String elementLocator,
                                  java.lang.String text)
        Asserts that the text embedded by the given element contains the given text.
        Parameters:
        elementLocator - locator identifying the element whose text should contain the given text
        text - the text that should be embedded in the given element
      • assertTextPresent

        protected void assertTextPresent​(java.lang.String text)
        Asserts that the given text is present.
        Parameters:
        text - the text that should be present
      • assertTitle

        protected void assertTitle​(java.lang.String title)
        Asserts that the given title matches the title.
        Parameters:
        title - the title that should match the title
      • assertValue

        protected void assertValue​(java.lang.String elementLocator,
                                   java.lang.String value)
        Asserts that the value of the given element matches the given value. If the element is a <textarea> this method asserts that the containing text matches the given value.
        Parameters:
        elementLocator - locator identifying the element whose value matches the given value
        value - the value that matches the given element's value
      • assertVisible

        protected void assertVisible​(java.lang.String elementLocator)
        Asserts that the given element is visible.
        Parameters:
        elementLocator - the element locator
      • assertXpathCount

        protected void assertXpathCount​(java.lang.String xpath,
                                        int count)
        Asserts that the number of elements locatable by the given XPath expression is equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements that must match the given XPath expression
      • assertXpathCount

        protected void assertXpathCount​(java.lang.String xpath,
                                        java.lang.String count)
        Asserts that the number of elements locatable by the given XPath expression is equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements that must match the given XPath expression
      • check

        protected HtmlPage check​(java.lang.String elementLocator)
                          throws java.io.IOException
        Checks/toggles the given element.
        Parameters:
        elementLocator - locator identifying the element to be checked/toggled
        Throws:
        java.io.IOException
      • checkAndWait

        protected HtmlPage checkAndWait​(java.lang.String elementLocator)
                                 throws java.io.IOException
        Checks/toggles the given element and waits for some activity to complete.
        Parameters:
        elementLocator - locator identifying the element to be checked/toggled
        Throws:
        java.io.IOException
      • click

        protected HtmlPage click​(java.lang.String elementLocator)
                          throws java.io.IOException
        Clicks the given element.
        Parameters:
        elementLocator - locator identifying the element to be clicked.
        Throws:
        java.io.IOException
      • clickAndWait

        protected HtmlPage clickAndWait​(java.lang.String elementLocator)
                                 throws java.io.IOException
        Clicks the given element and waits for some activity to complete.
        Parameters:
        elementLocator - locator identifying the element to be clicked
        Throws:
        java.io.IOException
      • close

        protected void close()
        Closes the current window if it is a top-level window.
      • contextMenu

        protected HtmlPage contextMenu​(java.lang.String elementLocator)
        Simulates a right-click on the given element.
        Parameters:
        elementLocator - locator identifying the element to fire events at
      • contextMenuAt

        protected HtmlPage contextMenuAt​(java.lang.String elementLocator,
                                         java.lang.String coordinates)
        Simulates a right-click at the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordinates - the coordinates relative to the given element
      • contextMenuAt

        protected HtmlPage contextMenuAt​(java.lang.String elementLocator,
                                         int coordX,
                                         int coordY)
        Simulates a right-click at the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordX - the X coordinate relative to the given element
        coordY - the Y coordinate relative to the given element
      • createCookie

        protected void createCookie​(java.lang.String cookie)
        Creates a new cookie. The new cookie will be stored as session cookie for the current path and domain.
        Parameters:
        cookie - name value pair of the new cookie
      • createCookie

        protected void createCookie​(java.lang.String cookie,
                                    java.lang.String options)
        Creates a new cookie.
        Parameters:
        cookie - name value pair of the new cookie
        options - cookie creation options (path, max_age and domain)
      • deleteAllVisibleCookies

        protected void deleteAllVisibleCookies()
        Removes all cookies visible to the current .
      • deleteCookie

        protected void deleteCookie​(java.lang.String name)
        Removes the cookie with the specified name.
        Parameters:
        name - the cookie's name
      • deleteCookie

        protected void deleteCookie​(java.lang.String name,
                                    java.lang.String options)
        Removes the cookie with the specified name.
        Parameters:
        name - the cookie's name
        options - cookie removal options (path, domain and recurse)
      • doubleClick

        protected HtmlPage doubleClick​(java.lang.String elementLocator)
                                throws java.io.IOException
        Double-clicks the given element.
        Parameters:
        elementLocator - locator identifying the element to be double-clicked
        Throws:
        java.io.IOException
      • doubleClickAndWait

        protected HtmlPage doubleClickAndWait​(java.lang.String elementLocator)
                                       throws java.io.IOException
        Double-clicks the given element and waits for a page to be loaded.
        Parameters:
        elementLocator - locator identifying the element to be double-clicked
        Throws:
        java.io.IOException
      • echo

        protected void echo​(java.lang.String message)
        Prints the given message to the log.
        Parameters:
        message - the message to print
      • mouseDown

        protected HtmlPage mouseDown​(java.lang.String elementLocator)
        Presses the left mouse button on an element, but does not release the button yet.
        Parameters:
        elementLocator - locator identifying the target element
      • mouseDownAt

        protected HtmlPage mouseDownAt​(java.lang.String elementLocator,
                                       java.lang.String coordinates)
        Presses the left mouse button at the given coordinates (relative to the given element), but does not release the button yet.
        Parameters:
        elementLocator - locator identifying the target element
        coordinates - the coordinates relative to the given element
      • mouseDownAt

        protected HtmlPage mouseDownAt​(java.lang.String elementLocator,
                                       int coordX,
                                       int coordY)
        Presses the left mouse button at the given coordinates (relative to the given element), but does not release the button yet.
        Parameters:
        elementLocator - locator identifying the target element
        coordX - the X coordinate relative to the given element
        coordY - the Y coordinate relative to the given element
      • mouseMove

        protected HtmlPage mouseMove​(java.lang.String elementLocator)
        Moves the mouse to the given element.
        Parameters:
        elementLocator - locator identifying the target element
      • mouseMoveAt

        protected HtmlPage mouseMoveAt​(java.lang.String elementLocator,
                                       java.lang.String coordinates)
        Moves the mouse to the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordinates - the coordinates relative to the given element
      • mouseMoveAt

        protected HtmlPage mouseMoveAt​(java.lang.String elementLocator,
                                       int coordX,
                                       int coordY)
        Moves the mouse to the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordX - the X coordinate relative to the given element
        coordY - the Y coordinate relative to the given element
      • mouseOut

        protected HtmlPage mouseOut​(java.lang.String elementLocator)
        Moves the mouse out of the element's bounding box.
        Parameters:
        elementLocator - locator identifying the target element
      • mouseOver

        protected HtmlPage mouseOver​(java.lang.String elementLocator)
        Hovers the mouse over an element.
        Parameters:
        elementLocator - locator identifying the target element
      • mouseUp

        protected HtmlPage mouseUp​(java.lang.String elementLocator)
        Releases the left mouse button on an element.
        Parameters:
        elementLocator - locator identifying the target element
      • mouseUpAt

        protected HtmlPage mouseUpAt​(java.lang.String elementLocator,
                                     java.lang.String coordinates)
        Releases the left mouse button at the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordinates - the coordinates relative to the given element
      • mouseUpAt

        protected HtmlPage mouseUpAt​(java.lang.String elementLocator,
                                     int coordX,
                                     int coordY)
        Releases the left mouse button at the given coordinates (relative to the given element).
        Parameters:
        elementLocator - locator identifying the target element
        coordX - the X coordinate relative to the given element
        coordY - the Y coordinate relative to the given element
      • open

        protected HtmlPage open​(java.lang.String urlToOpen)
                         throws java.lang.Exception
        Opens the given URL.
        Parameters:
        urlToOpen - the URL to open
        Returns:
        HTML page located at the given URL
        Throws:
        java.lang.Exception - thrown if access to the given URL has failed
      • open

        protected HtmlPage open​(java.net.URL urlToOpen)
                         throws java.lang.Exception
        Opens the given URL.
        Parameters:
        urlToOpen - the URL to open
        Returns:
        HTML page located at the given URL
        Throws:
        java.lang.Exception - thrown if access to the given URL has failed
      • pause

        protected HtmlPage pause​(long waitingTime)
        Waits the given time.
        Parameters:
        waitingTime - the time in milliseconds to wait
      • pause

        protected HtmlPage pause​(java.lang.String waitingTime)
        Waits the given time.
        Parameters:
        waitingTime - the time in milliseconds to wait
      • removeSelection

        protected HtmlPage removeSelection​(java.lang.String select,
                                           java.lang.String option)
        Removes the given option of the given select from the current selection.
        Parameters:
        select - the select
        option - the option to be removed from the current selection
      • select

        protected HtmlPage select​(java.lang.String select,
                                  java.lang.String option)
        Selects the given option of the given select.
        Parameters:
        select - the select
        option - the option to select
      • selectAndWait

        protected HtmlPage selectAndWait​(java.lang.String select,
                                         java.lang.String option)
        Selects the given option of the given select and waits for some activity to complete.
        Parameters:
        select - the select
        option - the option to select
      • selectFrame

        protected HtmlPage selectFrame​(java.lang.String frameTarget)
        Selects the given frame.
        Parameters:
        frameTarget - the frame to be selected
      • selectWindow

        protected HtmlPage selectWindow()
        Selects the top-level window.
      • selectWindow

        protected HtmlPage selectWindow​(java.lang.String windowTarget)
        Selects the given window.
        Parameters:
        windowTarget - the window to be selected
      • setTimeout

        protected void setTimeout​(long timeout)
        Sets the timeout to the given value.
        Parameters:
        timeout - the new timeout in milliseconds
      • setTimeout

        protected void setTimeout​(java.lang.String timeout)
        Sets the timeout to the given value.
        Parameters:
        timeout - the new timeout in milliseconds
      • store

        protected void store​(java.lang.String text,
                             java.lang.String variableName)
        Stores the given text to the given variable.
        Parameters:
        text - the text to store
        variableName - the variable name
      • storeAttribute

        protected void storeAttribute​(java.lang.String attributeLocator,
                                      java.lang.String variableName)
        Stores the value of the attribute identified by the given attribute locator to the given variable
        Parameters:
        attributeLocator - the attribute locator
        variableName - the variable name
      • storeAttribute

        protected void storeAttribute​(java.lang.String elementLocator,
                                      java.lang.String attributeName,
                                      java.lang.String variableName)
        Stores the value of the given element and attribute to the given variable.
        Parameters:
        elementLocator - the element locator
        attributeName - the name of the attribute
        variableName - the variable name
      • storeElementCount

        protected void storeElementCount​(java.lang.String elementLocator,
                                         java.lang.String variableName)
        Stores that the number of elements found by using the given element locator to the given variable.
        Parameters:
        elementLocator - the element locator
        variableName - the variable name
      • storeEval

        protected void storeEval​(java.lang.String expression,
                                 java.lang.String variableName)
        Stores the result of evaluating the given expression to the given variable.
        Parameters:
        expression - the expression to evaluate
        variableName - the variable
      • storeText

        protected void storeText​(java.lang.String elementLocator,
                                 java.lang.String variableName)
        Stores the text of the element identified by the given locator to the given variable.
        Parameters:
        elementLocator - the element locator
        variableName - the variable
      • storeTitle

        protected void storeTitle​(java.lang.String variableName)
        Stores the title of the currently active document to the given variable.
        Parameters:
        variableName - the name of the variable
      • storeValue

        protected void storeValue​(java.lang.String elementLocator,
                                  java.lang.String variableName)
        Stores the value (in case of a <textarea> the contained text) of the element identified by the given locator to the given variable.
        Parameters:
        elementLocator - the element locator
        variableName - the variable
      • storeXpathCount

        protected void storeXpathCount​(java.lang.String xpath,
                                       java.lang.String variableName)
        Stores the number of elements matching the given XPath expression to the given variable.
        Parameters:
        xpath - the XPath expression
        variableName - the variable
      • submit

        protected HtmlPage submit​(java.lang.String form)
                           throws java.lang.Exception
        Submits the given form.
        Parameters:
        form - the form to submit
        Throws:
        java.lang.Exception
      • submitAndWait

        protected HtmlPage submitAndWait​(java.lang.String form)
        Submits the given form and waits for some activity to complete.
        Parameters:
        form - the form to submit
      • type

        protected HtmlPage type​(java.lang.String elementLocator,
                                java.lang.String text)
                         throws java.io.IOException
        Types the given text into the given input field.
        Parameters:
        elementLocator - locator identifying the input field
        text - the text to be typed
        Throws:
        java.io.IOException
      • typeAndWait

        protected HtmlPage typeAndWait​(java.lang.String elementLocator,
                                       java.lang.String text)
        Types the given text into the given input field and waits for some activity to complete.
        Parameters:
        elementLocator - locator identifying the input field
        text - the text to be typed
      • uncheck

        protected HtmlPage uncheck​(java.lang.String elementLocator)
                            throws java.io.IOException
        Unchecks the given checkbox/radio button.
        Parameters:
        elementLocator - locator identifying the checkbox/radio button
        Throws:
        java.io.IOException
      • uncheckAndWait

        protected HtmlPage uncheckAndWait​(java.lang.String elementLocator)
                                   throws java.io.IOException
        Unchecks the given checkbox/radio button and waits for a load.
        Parameters:
        elementLocator - locator identifying the checkbox/radio button
        Throws:
        java.io.IOException
      • waitForAttribute

        protected HtmlPage waitForAttribute​(java.lang.String attributeLocator,
                                            java.lang.String textPattern)
        Waits until the value of the attribute identified by the given attribute locator matches the given text pattern.
        Parameters:
        attributeLocator - the attribute locator
        textPattern - the text pattern
      • waitForAttribute

        protected HtmlPage waitForAttribute​(java.lang.String elementLocator,
                                            java.lang.String attributeName,
                                            java.lang.String textPattern)
        Waits until the value of the given element and attribute matches the given text pattern.
        Parameters:
        elementLocator - the element locator
        attributeName - the name of the attribute
        textPattern - the text pattern
      • waitForChecked

        protected HtmlPage waitForChecked​(java.lang.String elementLocator)
        Waits until the given checkbox/radio button becomes checked.
        Parameters:
        elementLocator - the checkbox/radio button element locator
      • waitForClass

        protected HtmlPage waitForClass​(java.lang.String elementLocator,
                                        java.lang.String clazzString)
        Waits until the given element has the given class(es).
        Parameters:
        elementLocator - the element locator
        clazzString - the class(es) string
      • waitForElementCount

        protected HtmlPage waitForElementCount​(java.lang.String elementLocator,
                                               int count)
        Waits until the number of elements found by using the given element locator is equal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • waitForElementCount

        protected HtmlPage waitForElementCount​(java.lang.String elementLocator,
                                               java.lang.String count)
        Waits until the number of elements found by using the given element locator is equal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • waitForElementPresent

        protected HtmlPage waitForElementPresent​(java.lang.String elementLocator)
        Waits for the given element to appear.
        Parameters:
        elementLocator - locator identifying the element to wait for
      • waitForEval

        protected HtmlPage waitForEval​(java.lang.String expression,
                                       java.lang.String textPattern)
        Waits until the result of evaluating the given expression matches the given text pattern.
        Parameters:
        expression - the expression to evaluate
        textPattern - textPattern the text pattern the evaluation result must match
      • waitForNotAttribute

        protected HtmlPage waitForNotAttribute​(java.lang.String attributeLocator,
                                               java.lang.String textPattern)
        Waits until the value of the attribute identified by the given attribute locator does NOT match the given text pattern.
        Parameters:
        attributeLocator - the attribute locator
        textPattern - the text pattern that must NOT match
      • waitForNotAttribute

        protected HtmlPage waitForNotAttribute​(java.lang.String elementLocator,
                                               java.lang.String attributeName,
                                               java.lang.String textPattern)
        Waits until the value of the given element and attribute does NOT match the given text pattern.
        Parameters:
        elementLocator - the element locator
        attributeName - the name of the attribute
        textPattern - the text pattern
      • waitForNotChecked

        protected HtmlPage waitForNotChecked​(java.lang.String elementLocator)
        Waits until the given checkbox/radio button becomes unchecked.
        Parameters:
        elementLocator - the checkbox/radio button element locator
      • waitForNotClass

        protected HtmlPage waitForNotClass​(java.lang.String elementLocator,
                                           java.lang.String clazzString)
        Waits until the given element doesn't have the given class(es).
        Parameters:
        elementLocator - the element locator
        clazzString - the class(es) string
      • waitForNotElementCount

        protected HtmlPage waitForNotElementCount​(java.lang.String elementLocator,
                                                  int count)
        Waits until the number of elements found by using the given element locator is unequal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • waitForNotElementCount

        protected HtmlPage waitForNotElementCount​(java.lang.String elementLocator,
                                                  java.lang.String count)
        Waits until the number of elements found by using the given element locator is unequal to the given count.
        Parameters:
        elementLocator - the element locator
        count - the number of elements
      • waitForNotElementPresent

        protected HtmlPage waitForNotElementPresent​(java.lang.String elementLocator)
        Waits for the given element to disappear.
        Parameters:
        elementLocator - locator identifying the element to disappear
      • waitForNotEval

        protected HtmlPage waitForNotEval​(java.lang.String expression,
                                          java.lang.String textPattern)
        Waits until the result of evaluating the given expression does NOT match the given text pattern.
        Parameters:
        expression - the expression to evaluate
        textPattern - the text pattern that the evaluation result must NOT match
      • waitForNotSelectedId

        protected HtmlPage waitForNotSelectedId​(java.lang.String selectLocator,
                                                java.lang.String idPattern)
        Waits until no ID of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        idPattern - the ID pattern that must not match
      • waitForNotSelectedIndex

        protected HtmlPage waitForNotSelectedIndex​(java.lang.String selectLocator,
                                                   java.lang.String indexPattern)
        Waits until the option of the given select element at the given index is not selected.
        Parameters:
        selectLocator - the select element locator
        indexPattern - the option index pattern
      • waitForNotSelectedLabel

        protected HtmlPage waitForNotSelectedLabel​(java.lang.String selectLocator,
                                                   java.lang.String labelPattern)
        Waits until no label of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        labelPattern - the label pattern
      • waitForNotSelectedValue

        protected HtmlPage waitForNotSelectedValue​(java.lang.String selectLocator,
                                                   java.lang.String valuePattern)
        Waits until no value of all selected options of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        valuePattern - the value pattern
      • waitForNotStyle

        protected HtmlPage waitForNotStyle​(java.lang.String elementLocator,
                                           java.lang.String styleText)
        Waits until the effective style of the element identified by the given element locator does NOT match the given style.
        Parameters:
        elementLocator - the element locator
        styleText - the style that must NOT match (e.g. width: 10px; overflow: hidden;)
      • waitForNotText

        protected HtmlPage waitForNotText​(java.lang.String elementLocator,
                                          java.lang.String text)
        Waits for the given text embedded in the given element to disappear/change.
        Parameters:
        elementLocator - locator identifying the element whose embedded text should change
        text - the text that should change/disappear
      • waitForNotTextPresent

        protected HtmlPage waitForNotTextPresent​(java.lang.String text)
        Waits for the given text to disappear/change.
        Parameters:
        text - the text that should disappear/change
      • waitForNotTitle

        protected HtmlPage waitForNotTitle​(java.lang.String title)
        Waits for the given title change.
        Parameters:
        title - the title that should change
      • waitForNotValue

        protected HtmlPage waitForNotValue​(java.lang.String elementLocator,
                                           java.lang.String value)
        Waits for the given value in the given element to disappear/change.
        Parameters:
        elementLocator - locator identifying the element whose value should disappear/change
        value - the value to disappear/change
      • waitForNotVisible

        protected HtmlPage waitForNotVisible​(java.lang.String elementLocator)
        Waits for the given element to become invisible.
        Parameters:
        elementLocator - the element locator
      • waitForNotXpathCount

        protected HtmlPage waitForNotXpathCount​(java.lang.String xpath,
                                                int count)
        Waits for the number of elements matching the given XPath expression change to a different value than the given one.
        Parameters:
        xpath - the XPath expression
        count - the number of elements currently matching the given XPath expression
      • waitForNotXpathCount

        protected HtmlPage waitForNotXpathCount​(java.lang.String xpath,
                                                java.lang.String count)
        Waits for the number of elements matching the given XPath expression change to a different value than the given one.
        Parameters:
        xpath - the XPath expression
        count - the number of elements currently matching the given XPath expression
      • waitForPageToLoad

        protected HtmlPage waitForPageToLoad()
        Waits for the page to load.
      • waitForPopUp

        protected void waitForPopUp()
        Waits for any pop-up window to be loaded completely.
      • waitForPopUp

        protected void waitForPopUp​(java.lang.String windowID)
        Waits for some pop-up window to be loaded completely.
        Parameters:
        windowID - the ID of the window to wait for
      • waitForPopUp

        protected void waitForPopUp​(java.lang.String windowID,
                                    long maxWaitingTime)
        Waits at most the given time for some pop-up window to be loaded completely.
        Parameters:
        windowID - the ID of the window to wait for
        maxWaitingTime - the maximum waiting time
      • waitForPopUp

        protected void waitForPopUp​(java.lang.String windowID,
                                    java.lang.String maxWaitingTime)
        Waits at most the given time for some pop-up window to be loaded completely.
        Parameters:
        windowID - the ID of the window to wait for
        maxWaitingTime - the maximum waiting time
      • waitForSelectedId

        protected HtmlPage waitForSelectedId​(java.lang.String selectLocator,
                                             java.lang.String idPattern)
        Waits until the ID of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        idPattern - the ID pattern
      • waitForSelectedIndex

        protected HtmlPage waitForSelectedIndex​(java.lang.String selectLocator,
                                                java.lang.String indexPattern)
        Waits until the option of the given select element at the given index is selected.
        Parameters:
        selectLocator - the select element locator
        indexPattern - the option index pattern
      • waitForSelectedLabel

        protected HtmlPage waitForSelectedLabel​(java.lang.String selectLocator,
                                                java.lang.String labelPattern)
        Waits until the label of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        labelPattern - the label pattern
      • waitForSelectedValue

        protected HtmlPage waitForSelectedValue​(java.lang.String selectLocator,
                                                java.lang.String valuePattern)
        Waits until the value of at least one selected option of the given select element matches the given pattern.
        Parameters:
        selectLocator - the select element locator
        valuePattern - the value pattern
      • waitForStyle

        protected HtmlPage waitForStyle​(java.lang.String elementLocator,
                                        java.lang.String styleText)
        Waits until the effective style of the element identified by the given element locator matches the given style.
        Parameters:
        elementLocator - the element locator
        styleText - the style that must match (e.g. width: 10px; overflow: hidden;)
      • waitForText

        protected HtmlPage waitForText​(java.lang.String elementLocator,
                                       java.lang.String text)
        Waits for the given text embedded in the given element.
        Parameters:
        elementLocator - locator identifying the element whose text should contain the given text
        text - the text to wait for
      • waitForTextPresent

        protected HtmlPage waitForTextPresent​(java.lang.String text)
        Waits for the given text to appear.
        Parameters:
        text - the text to wait for
      • waitForTitle

        protected HtmlPage waitForTitle​(java.lang.String title)
        Waits for the given title.
        Parameters:
        title - the title to wait for
      • waitForValue

        protected HtmlPage waitForValue​(java.lang.String elementLocator,
                                        java.lang.String value)
        Waits for the given value in the given element.
        Parameters:
        elementLocator - locator identifying the element whose value should match the given value
        value - the value to wait for
      • waitForVisible

        protected HtmlPage waitForVisible​(java.lang.String elementLocator)
        Waits until the given element becomes visible.
        Parameters:
        elementLocator - the element locator
      • waitForXpathCount

        protected HtmlPage waitForXpathCount​(java.lang.String xpath,
                                             int count)
        Waits for the number of elements matching the given XPath expression is equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements to wait for
      • waitForXpathCount

        protected HtmlPage waitForXpathCount​(java.lang.String xpath,
                                             java.lang.String count)
        Waits for the number of elements matching the given XPath expression is equal to the given count.
        Parameters:
        xpath - the XPath expression
        count - the number of elements to wait for
      • getBaseUrl

        protected java.lang.String getBaseUrl()
        Returns the configured base URL as string.
        Returns:
        base URL as string
      • resolve

        protected java.lang.String resolve​(java.lang.String resolvable)
        Resolves the given string.
        Parameters:
        resolvable - the string to be resolved
        Returns:
        the resolved string
      • resolveKey

        protected java.lang.String resolveKey​(java.lang.String key)
        Resolves the given test data key.
        Parameters:
        key - the key string containing only the name of a test data field
        Returns:
        resolved string or null if not found
      • evaluatesToTrue

        protected boolean evaluatesToTrue​(java.lang.String jsExpression)
        Returns whether or not the given expression evaluates to true.
        Parameters:
        jsExpression - the JavaScript expression to evaluate
        Returns:
        true if and only if the given JavaScript expression is not blank and evaluates to true