Class AbstractHtmlUnitScriptAction
- java.lang.Object
-
- com.xceptance.xlt.api.actions.AbstractAction
-
- com.xceptance.xlt.api.actions.AbstractWebAction
-
- com.xceptance.xlt.api.actions.AbstractHtmlPageAction
-
- com.xceptance.xlt.api.engine.scripting.AbstractHtmlUnitScriptAction
-
public abstract class AbstractHtmlUnitScriptAction extends AbstractHtmlPageAction
Base class of HTML page actions supporting script commands.
-
-
Field Summary
-
Fields inherited from class com.xceptance.xlt.api.actions.AbstractWebAction
EMPTY_PARAMETER_LIST
-
-
Constructor Summary
Constructors Constructor Description AbstractHtmlUnitScriptAction(AbstractWebAction previousAction)Constructor.AbstractHtmlUnitScriptAction(AbstractWebAction prevAction, java.lang.String timerName)Constructor.AbstractHtmlUnitScriptAction(java.lang.String timerName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HtmlPageaddSelection(java.lang.String select, java.lang.String option)Adds the given option of the given select to the current selection.protected voidassertAttribute(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 voidassertAttribute(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 voidassertChecked(java.lang.String elementLocator)Asserts that the given checkbox/radio button is checked.protected voidassertClass(java.lang.String elementLocator, java.lang.String clazzString)Asserts that the given element has the given class(es).protected voidassertElementCount(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 voidassertElementCount(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 voidassertElementPresent(java.lang.String elementLocator)Asserts that the given element is present.protected voidassertEval(java.lang.String expression, java.lang.String textPattern)Asserts that evaluating the given expression matches the given text pattern.protected voidassertLoadTime(long loadTime)Asserts that the time needed to load a does not exceed the given value.protected voidassertLoadTime(java.lang.String loadTime)Asserts that the time needed to load a does not exceed the given value.protected voidassertNotAttribute(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 voidassertNotAttribute(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 voidassertNotChecked(java.lang.String elementLocator)Asserts that the given checkbox/radio button is unchecked.protected voidassertNotClass(java.lang.String elementLocator, java.lang.String clazzString)Asserts that the given element doesn't have the given class(es).protected voidassertNotElementCount(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 voidassertNotElementCount(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 voidassertNotElementPresent(java.lang.String elementLocator)Asserts that the given element is not present.protected voidassertNotEval(java.lang.String expression, java.lang.String textPattern)Asserts that evaluating the given expression does NOT match the given text pattern.protected voidassertNotSelectedId(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 voidassertNotSelectedIndex(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 voidassertNotSelectedLabel(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 voidassertNotSelectedValue(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 voidassertNotStyle(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 voidassertNotText(java.lang.String elementLocator, java.lang.String text)Asserts that the embedded text of the given element does not contain the given text.protected voidassertNotTextPresent(java.lang.String text)Asserts that the given text is not present on the .protected voidassertNotTitle(java.lang.String title)Asserts that the title does not match the given title.protected voidassertNotValue(java.lang.String elementLocator, java.lang.String value)Asserts that the value of the given element doesn't match the given value.protected voidassertNotVisible(java.lang.String elementLocator)Asserts that the given element is invisible.protected voidassertNotXpathCount(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 voidassertNotXpathCount(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 voidassertPageSize(long pageSize)Asserts that the size of the actual (including images etc.) does not exceed the given value.protected voidassertPageSize(java.lang.String pageSize)Asserts that the size of the actual (including images etc.) does not exceed the given value.protected voidassertSelectedId(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 voidassertSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Asserts that the option of the given select element at the given index is selected.protected voidassertSelectedLabel(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 voidassertSelectedValue(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 voidassertStyle(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 voidassertText(java.lang.String elementLocator, java.lang.String text)Asserts that the text embedded by the given element contains the given text.protected voidassertTextPresent(java.lang.String text)Asserts that the given text is present.protected voidassertTitle(java.lang.String title)Asserts that the given title matches the title.protected voidassertValue(java.lang.String elementLocator, java.lang.String value)Asserts that the value of the given element matches the given value.protected voidassertVisible(java.lang.String elementLocator)Asserts that the given element is visible.protected voidassertXpathCount(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 voidassertXpathCount(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 HtmlPagecheck(java.lang.String elementLocator)Checks/toggles the given element.protected HtmlPagecheckAndWait(java.lang.String elementLocator)Checks/toggles the given element and waits for some activity to complete.protected HtmlPageclick(java.lang.String elementLocator)Clicks the given element.protected HtmlPageclickAndWait(java.lang.String elementLocator)Clicks the given element and waits for some activity to complete.protected voidclose()Closes the current window if it is a top-level window.protected HtmlPagecontextMenu(java.lang.String elementLocator)Simulates a right-click on the given element.protected HtmlPagecontextMenuAt(java.lang.String elementLocator, int coordX, int coordY)Simulates a right-click at the given coordinates (relative to the given element).protected HtmlPagecontextMenuAt(java.lang.String elementLocator, java.lang.String coordinates)Simulates a right-click at the given coordinates (relative to the given element).protected voidcreateCookie(java.lang.String cookie)Creates a new cookie.protected voidcreateCookie(java.lang.String cookie, java.lang.String options)Creates a new cookie.protected voiddeleteAllVisibleCookies()Removes all cookies visible to the current .protected voiddeleteCookie(java.lang.String name)Removes the cookie with the specified name.protected voiddeleteCookie(java.lang.String name, java.lang.String options)Removes the cookie with the specified name.protected HtmlPagedoubleClick(java.lang.String elementLocator)Double-clicks the given element.protected HtmlPagedoubleClickAndWait(java.lang.String elementLocator)Double-clicks the given element and waits for a page to be loaded.protected voidecho(java.lang.String message)Prints the given message to the log.protected booleanevaluatesToTrue(java.lang.String jsExpression)Returns whether or not the given expression evaluates totrue.protected java.lang.StringgetBaseUrl()Returns the configured base URL as string.protected HtmlPagemouseDown(java.lang.String elementLocator)Presses the left mouse button on an element, but does not release the button yet.protected HtmlPagemouseDownAt(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 HtmlPagemouseDownAt(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 HtmlPagemouseMove(java.lang.String elementLocator)Moves the mouse to the given element.protected HtmlPagemouseMoveAt(java.lang.String elementLocator, int coordX, int coordY)Moves the mouse to the given coordinates (relative to the given element).protected HtmlPagemouseMoveAt(java.lang.String elementLocator, java.lang.String coordinates)Moves the mouse to the given coordinates (relative to the given element).protected HtmlPagemouseOut(java.lang.String elementLocator)Moves the mouse out of the element's bounding box.protected HtmlPagemouseOver(java.lang.String elementLocator)Hovers the mouse over an element.protected HtmlPagemouseUp(java.lang.String elementLocator)Releases the left mouse button on an element.protected HtmlPagemouseUpAt(java.lang.String elementLocator, int coordX, int coordY)Releases the left mouse button at the given coordinates (relative to the given element).protected HtmlPagemouseUpAt(java.lang.String elementLocator, java.lang.String coordinates)Releases the left mouse button at the given coordinates (relative to the given element).protected HtmlPageopen(java.lang.String urlToOpen)Opens the given URL.protected HtmlPageopen(java.net.URL urlToOpen)Opens the given URL.protected HtmlPagepause(long waitingTime)Waits the given time.protected HtmlPagepause(java.lang.String waitingTime)Waits the given time.protected HtmlPageremoveSelection(java.lang.String select, java.lang.String option)Removes the given option of the given select from the current selection.protected java.lang.Stringresolve(java.lang.String resolvable)Resolves the given string.protected java.lang.StringresolveKey(java.lang.String key)Resolves the given test data key.protected HtmlPageselect(java.lang.String select, java.lang.String option)Selects the given option of the given select.protected HtmlPageselectAndWait(java.lang.String select, java.lang.String option)Selects the given option of the given select and waits for some activity to complete.protected HtmlPageselectFrame(java.lang.String frameTarget)Selects the given frame.protected HtmlPageselectWindow()Selects the top-level window.protected HtmlPageselectWindow(java.lang.String windowTarget)Selects the given window.protected voidsetTimeout(long timeout)Sets the timeout to the given value.protected voidsetTimeout(java.lang.String timeout)Sets the timeout to the given value.protected voidstore(java.lang.String text, java.lang.String variableName)Stores the given text to the given variable.protected voidstoreAttribute(java.lang.String attributeLocator, java.lang.String variableName)Stores the value of the attribute identified by the given attribute locator to the given variableprotected voidstoreAttribute(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 voidstoreElementCount(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 voidstoreEval(java.lang.String expression, java.lang.String variableName)Stores the result of evaluating the given expression to the given variable.protected voidstoreText(java.lang.String elementLocator, java.lang.String variableName)Stores the text of the element identified by the given locator to the given variable.protected voidstoreTitle(java.lang.String variableName)Stores the title of the currently active document to the given variable.protected voidstoreValue(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 voidstoreXpathCount(java.lang.String xpath, java.lang.String variableName)Stores the number of elements matching the given XPath expression to the given variable.protected HtmlPagesubmit(java.lang.String form)Submits the given form.protected HtmlPagesubmitAndWait(java.lang.String form)Submits the given form and waits for some activity to complete.protected HtmlPagetype(java.lang.String elementLocator, java.lang.String text)Types the given text into the given input field.protected HtmlPagetypeAndWait(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 HtmlPageuncheck(java.lang.String elementLocator)Unchecks the given checkbox/radio button.protected HtmlPageuncheckAndWait(java.lang.String elementLocator)Unchecks the given checkbox/radio button and waits for a load.protected HtmlPagewaitForAttribute(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 HtmlPagewaitForAttribute(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 HtmlPagewaitForChecked(java.lang.String elementLocator)Waits until the given checkbox/radio button becomes checked.protected HtmlPagewaitForClass(java.lang.String elementLocator, java.lang.String clazzString)Waits until the given element has the given class(es).protected HtmlPagewaitForElementCount(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 HtmlPagewaitForElementCount(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 HtmlPagewaitForElementPresent(java.lang.String elementLocator)Waits for the given element to appear.protected HtmlPagewaitForEval(java.lang.String expression, java.lang.String textPattern)Waits until the result of evaluating the given expression matches the given text pattern.protected HtmlPagewaitForNotAttribute(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 HtmlPagewaitForNotAttribute(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 HtmlPagewaitForNotChecked(java.lang.String elementLocator)Waits until the given checkbox/radio button becomes unchecked.protected HtmlPagewaitForNotClass(java.lang.String elementLocator, java.lang.String clazzString)Waits until the given element doesn't have the given class(es).protected HtmlPagewaitForNotElementCount(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 HtmlPagewaitForNotElementCount(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 HtmlPagewaitForNotElementPresent(java.lang.String elementLocator)Waits for the given element to disappear.protected HtmlPagewaitForNotEval(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 HtmlPagewaitForNotSelectedId(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 HtmlPagewaitForNotSelectedIndex(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 HtmlPagewaitForNotSelectedLabel(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 HtmlPagewaitForNotSelectedValue(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 HtmlPagewaitForNotStyle(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 HtmlPagewaitForNotText(java.lang.String elementLocator, java.lang.String text)Waits for the given text embedded in the given element to disappear/change.protected HtmlPagewaitForNotTextPresent(java.lang.String text)Waits for the given text to disappear/change.protected HtmlPagewaitForNotTitle(java.lang.String title)Waits for the given title change.protected HtmlPagewaitForNotValue(java.lang.String elementLocator, java.lang.String value)Waits for the given value in the given element to disappear/change.protected HtmlPagewaitForNotVisible(java.lang.String elementLocator)Waits for the given element to become invisible.protected HtmlPagewaitForNotXpathCount(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 HtmlPagewaitForNotXpathCount(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 HtmlPagewaitForPageToLoad()Waits for the page to load.protected voidwaitForPopUp()Waits for any pop-up window to be loaded completely.protected voidwaitForPopUp(java.lang.String windowID)Waits for some pop-up window to be loaded completely.protected voidwaitForPopUp(java.lang.String windowID, long maxWaitingTime)Waits at most the given time for some pop-up window to be loaded completely.protected voidwaitForPopUp(java.lang.String windowID, java.lang.String maxWaitingTime)Waits at most the given time for some pop-up window to be loaded completely.protected HtmlPagewaitForSelectedId(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 HtmlPagewaitForSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Waits until the option of the given select element at the given index is selected.protected HtmlPagewaitForSelectedLabel(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 HtmlPagewaitForSelectedValue(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 HtmlPagewaitForStyle(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 HtmlPagewaitForText(java.lang.String elementLocator, java.lang.String text)Waits for the given text embedded in the given element.protected HtmlPagewaitForTextPresent(java.lang.String text)Waits for the given text to appear.protected HtmlPagewaitForTitle(java.lang.String title)Waits for the given title.protected HtmlPagewaitForValue(java.lang.String elementLocator, java.lang.String value)Waits for the given value in the given element.protected HtmlPagewaitForVisible(java.lang.String elementLocator)Waits until the given element becomes visible.protected HtmlPagewaitForXpathCount(java.lang.String xpath, int count)Waits for the number of elements matching the given XPath expression is equal to the given count.protected HtmlPagewaitForXpathCount(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 com.xceptance.xlt.api.actions.AbstractHtmlPageAction
getHtmlPage, getNetworkDataSet, getPreviousAction, loadPage, loadPage, loadPage, loadPage, loadPage, loadPage, loadPageByClick, loadPageByClick, loadPageByDragAndDrop, loadPageByDragAndDrop, loadPageByFormClick, loadPageByFormClick, loadPageByFormClick, loadPageByFormClick, loadPageByFormSubmit, loadPageByFormSubmit, loadPageByFormSubmit, loadPageByFormSubmit, loadPageBySelect, loadPageBySelect, loadPageBySelect, loadPageBySelect, loadPageByTypingKeys, loadPageByTypingKeys, run, setHtmlPage, setHtmlPage
-
Methods inherited from class com.xceptance.xlt.api.actions.AbstractWebAction
addResponseProcessor, closeWebClient, createWebRequestSettings, getWebClient
-
Methods inherited from class com.xceptance.xlt.api.actions.AbstractAction
execute, executeThinkTime, getThinkTime, getThinkTimeDeviation, getTimerName, postValidate, preValidate, preValidateSafe, setThinkTime, setThinkTime, setThinkTimeDeviation, setThinkTimeDeviation, setTimerName
-
-
-
-
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 actiontimerName- 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 selectoption- 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 locatortextPattern- 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 locatorattributeName- the name of the attributetextPattern- 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 locatorclazzString- 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 locatorcount- 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 locatorcount- 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 evaluatetextPattern- 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 locatortextPattern- 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 locatorattributeName- the name of the attributetextPattern- 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 locatorclazzString- 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 locatorcount- 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 locatorcount- 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 evaluatetextPattern- 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 locatoridPattern- 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 locatorindexPattern- 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 locatorlabelPattern- 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 locatorvaluePattern- 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 locatorstyleText- 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 elementtext- 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 valuevalue- 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 expressioncount- 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 expressioncount- 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 locatoridPattern- 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 locatorindexPattern- 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 locatorlabelPattern- 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 locatorvaluePattern- 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 locatorstyleText- 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 texttext- 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 valuevalue- 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 expressioncount- 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 expressioncount- 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 elementcoordinates- 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 elementcoordX- the X coordinate relative to the given elementcoordY- 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 cookieoptions- 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 nameoptions- 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 elementcoordinates- 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 elementcoordX- the X coordinate relative to the given elementcoordY- 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 elementcoordinates- 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 elementcoordX- the X coordinate relative to the given elementcoordY- 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 elementcoordinates- 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 elementcoordX- the X coordinate relative to the given elementcoordY- 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 selectoption- 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 selectoption- 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 selectoption- 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 storevariableName- 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 locatorvariableName- 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 locatorattributeName- the name of the attributevariableName- 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 locatorvariableName- 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 evaluatevariableName- 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 locatorvariableName- 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 locatorvariableName- 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 expressionvariableName- 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 fieldtext- 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 fieldtext- 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 locatortextPattern- 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 locatorattributeName- the name of the attributetextPattern- 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 locatorclazzString- 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 locatorcount- 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 locatorcount- 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 evaluatetextPattern- 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 locatortextPattern- 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 locatorattributeName- the name of the attributetextPattern- 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 locatorclazzString- 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 locatorcount- 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 locatorcount- 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 evaluatetextPattern- 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 locatoridPattern- 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 locatorindexPattern- 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 locatorlabelPattern- 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 locatorvaluePattern- 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 locatorstyleText- 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 changetext- 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/changevalue- 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 expressioncount- 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 expressioncount- 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 formaxWaitingTime- 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 formaxWaitingTime- 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 locatoridPattern- 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 locatorindexPattern- 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 locatorlabelPattern- 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 locatorvaluePattern- 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 locatorstyleText- 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 texttext- 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 valuevalue- 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 expressioncount- 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 expressioncount- 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
nullif not found
-
evaluatesToTrue
protected boolean evaluatesToTrue(java.lang.String jsExpression)
Returns whether or not the given expression evaluates totrue.- Parameters:
jsExpression- the JavaScript expression to evaluate- Returns:
trueif and only if the given JavaScript expression is not blank and evaluates totrue
-
-