Interface ScriptCommands
-
- All Known Implementing Classes:
AbstractWebDriverModule,AbstractWebDriverScriptTestCase
public interface ScriptCommandsSelenium-like commands supported by the XLT framework and the script developer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSelection(java.lang.String select, java.lang.String option)Adds the given option of the given select to the current selection.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.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.voidassertChecked(java.lang.String elementLocator)Asserts that the given checkbox/radio button is checked.voidassertClass(java.lang.String elementLocator, java.lang.String clazzString)Asserts that the given element has the given class(es).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.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.voidassertElementPresent(java.lang.String elementLocator)Asserts that the given element is present.voidassertEval(java.lang.String expression, java.lang.String textPattern)Asserts that evaluating the given expression matches the given text pattern.voidassertLoadTime(long loadTime)Asserts that the time needed to load a page does not exceed the given value.voidassertLoadTime(java.lang.String loadTime)Asserts that the time needed to load a page does not exceed the given value.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.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.voidassertNotChecked(java.lang.String elementLocator)Asserts that the given checkbox/radio button is unchecked.voidassertNotClass(java.lang.String elementLocator, java.lang.String clazzString)Asserts that the given element doesn't have the given class(es).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.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.voidassertNotElementPresent(java.lang.String elementLocator)Asserts that the given element is not present.voidassertNotEval(java.lang.String expression, java.lang.String textPattern)Asserts that evaluating the given expression does NOT match the given text pattern.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.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.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.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.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.voidassertNotText(java.lang.String elementLocator, java.lang.String text)Asserts that the embedded text of the given element does not contain the given text.voidassertNotTextPresent(java.lang.String text)Asserts that the given text is not present on the page.voidassertNotTitle(java.lang.String title)Asserts that the page title does not match the given title.voidassertNotValue(java.lang.String elementLocator, java.lang.String valuePattern)Asserts that the value of the given element doesn't match the given value.voidassertNotVisible(java.lang.String elementLocator)Asserts that the given element is invisible.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.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.voidassertPageSize(long pageSize)Asserts that the size of the actual page (including images etc.) does not exceed the given value.voidassertPageSize(java.lang.String pageSize)Asserts that the size of the actual page (including images etc.) does not exceed the given value.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.voidassertSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Asserts that the option of the given select element at the given index is selected.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.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.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.voidassertText(java.lang.String elementLocator, java.lang.String text)Asserts that the text embedded by the given element contains the given text.voidassertTextPresent(java.lang.String text)Asserts that the given text is present.voidassertTitle(java.lang.String title)Asserts that the given title matches the page title.voidassertValue(java.lang.String elementLocator, java.lang.String valuePattern)Asserts that the value of the given element matches the given value.voidassertVisible(java.lang.String elementLocator)Asserts that the given element is visible.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.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.voidcheck(java.lang.String elementLocator)Checks/toggles the given element.voidcheckAndWait(java.lang.String elementLocator)Checks/toggles the given element and waits for some activity to complete.voidclick(java.lang.String elementLocator)Clicks the given element.voidclickAndWait(java.lang.String elementLocator)Clicks the given element and waits for some activity to complete.voidclose()Closes the browser.voidcontextMenu(java.lang.String elementLocator)Simulates a right-click on the given element.voidcontextMenuAt(java.lang.String elementLocator, int coordX, int coordY)Simulates a right-click at the given coordinates (relative to the given element).voidcontextMenuAt(java.lang.String elementLocator, java.lang.String coordinates)Simulates a right-click at the given coordinates (relative to the given element).voidcreateCookie(java.lang.String cookie)Creates a new cookie.voidcreateCookie(java.lang.String cookie, java.lang.String options)Creates a new cookie.voiddeleteAllVisibleCookies()Removes all cookies visible to the current page.voiddeleteCookie(java.lang.String name)Removes the cookie with the specified name.voiddeleteCookie(java.lang.String name, java.lang.String options)Removes the cookie with the specified name.voiddoubleClick(java.lang.String elementLocator)Double-clicks the given element.voiddoubleClickAndWait(java.lang.String elementLocator)Double-clicks the given element and waits for some activity to complete.voidecho(java.lang.String message)Prints the given message to the log.voidmouseDown(java.lang.String elementLocator)Presses the left mouse button on an element, but does not release the button yet.voidmouseDownAt(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.voidmouseDownAt(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.voidmouseMove(java.lang.String elementLocator)Moves the mouse to the given element.voidmouseMoveAt(java.lang.String elementLocator, int coordX, int coordY)Moves the mouse to the given coordinates (relative to the given element).voidmouseMoveAt(java.lang.String elementLocator, java.lang.String coordinates)Moves the mouse to the given coordinates (relative to the given element).voidmouseOut(java.lang.String elementLocator)Moves the mouse out of the element's bounding box.voidmouseOver(java.lang.String elementLocator)Hovers the mouse over an element.voidmouseUp(java.lang.String elementLocator)Releases the left mouse button on an element.voidmouseUpAt(java.lang.String elementLocator, int coordX, int coordY)Releases the left mouse button at the given coordinates (relative to the given element).voidmouseUpAt(java.lang.String elementLocator, java.lang.String coordinates)Releases the left mouse button at the given coordinates (relative to the given element).voidopen(java.lang.String pageUrlString)Opens the given URL.voidpause(long waitingTime)Waits the given time.voidpause(java.lang.String waitingTime)Waits the given time.voidremoveSelection(java.lang.String select, java.lang.String option)Removes the given option of the given select from the current selection.voidselect(java.lang.String select, java.lang.String option)Selects the given option of the given select.voidselectAndWait(java.lang.String select, java.lang.String option)Selects the given option of the given select and waits for some activity to complete.voidselectFrame(java.lang.String frameTarget)Selects the given frame.voidselectWindow()Selects the top-level window.voidselectWindow(java.lang.String windowTarget)Selects the given window.voidsetTimeout(long timeout)Sets the timeout to the given value.voidsetTimeout(java.lang.String timeout)Sets the timeout to the given value.voidstartAction(java.lang.String actionName)Starts a new action using the given name.voidstore(java.lang.String text, java.lang.String variableName)Stores the given text to the given variable.voidstoreAttribute(java.lang.String attributeLocator, java.lang.String variableName)Stores the value of the attribute identified by the given attribute locator to the given variablevoidstoreAttribute(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.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.voidstoreEval(java.lang.String expression, java.lang.String variableName)Stores the result of evaluating the given expression to the given variable.voidstoreText(java.lang.String elementLocator, java.lang.String variableName)Stores the text of the element identified by the given locator to the given variable.voidstoreTitle(java.lang.String variableName)Stores the title of the currently active document to the given variable.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.voidstoreXpathCount(java.lang.String xpath, java.lang.String variableName)Stores the number of elements matching the given XPath expression to the given variable.voidsubmit(java.lang.String form)Submits the given form.voidsubmitAndWait(java.lang.String form)Submits the given form and waits for some activity to complete.voidtype(java.lang.String elementLocator, java.lang.String text)Types the given text into the given input field.voidtypeAndWait(java.lang.String elementLocator, java.lang.String text)Types the given text into the given input field and waits for some activity to complete.voiduncheck(java.lang.String elementLocator)Unchecks the given checkbox/radio button.voiduncheckAndWait(java.lang.String elementLocator)Unchecks the given checkbox/radio button and waits for a page load.voidwaitForAttribute(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.voidwaitForAttribute(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.voidwaitForChecked(java.lang.String elementLocator)Waits until the given checkbox/radio button becomes checked.voidwaitForClass(java.lang.String elementLocator, java.lang.String clazzString)Waits until the given element has the given class(es).voidwaitForElementCount(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.voidwaitForElementCount(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.voidwaitForElementPresent(java.lang.String elementLocator)Waits for the given element to appear.voidwaitForEval(java.lang.String expression, java.lang.String textPattern)Waits until the result of evaluating the given expression matches the given text pattern.voidwaitForNotAttribute(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.voidwaitForNotAttribute(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.voidwaitForNotChecked(java.lang.String elementLocator)Waits until the given checkbox/radio button becomes unchecked.voidwaitForNotClass(java.lang.String elementLocator, java.lang.String clazzString)Waits until the given element doesn't have the given class(es).voidwaitForNotElementCount(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.voidwaitForNotElementCount(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.voidwaitForNotElementPresent(java.lang.String elementLocator)Waits for the given element to disappear.voidwaitForNotEval(java.lang.String expression, java.lang.String textPattern)Waits until the result of evaluating the given expression does NOT match the given text pattern.voidwaitForNotSelectedId(java.lang.String selectLocator, java.lang.String idPattern)Waits until no ID of all selected options of the given select matches the given pattern.voidwaitForNotSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Waits until the option of the given select element at the given index is not selected.voidwaitForNotSelectedLabel(java.lang.String selectLocator, java.lang.String labelPattern)Waits until no label of all selected options of the given select matches the given pattern.voidwaitForNotSelectedValue(java.lang.String selectLocator, java.lang.String valuePattern)Waits until no value of all selected options of the given select matches the given pattern.voidwaitForNotStyle(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.voidwaitForNotText(java.lang.String elementLocator, java.lang.String text)Waits for the given text embedded in the given element to disappear/change.voidwaitForNotTextPresent(java.lang.String text)Waits for the given text to disappear/change.voidwaitForNotTitle(java.lang.String title)Waits for the given page title change.voidwaitForNotValue(java.lang.String elementLocator, java.lang.String value)Waits for the given value in the given element to disappear/change.voidwaitForNotVisible(java.lang.String elementLocator)Waits until the given element becomes invisible.voidwaitForNotXpathCount(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.voidwaitForNotXpathCount(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.voidwaitForPageToLoad()Waits for the page to be loaded completely.voidwaitForPopUp()Waits for any pop-up window to be loaded completely.voidwaitForPopUp(java.lang.String windowID)Waits for some pop-up window to be loaded completely.voidwaitForPopUp(java.lang.String windowID, long maxWaitingTime)Waits at most the given time for some pop-up window to be loaded completely.voidwaitForPopUp(java.lang.String windowID, java.lang.String maxWaitingTime)Waits at most the given time for some pop-up window to be loaded completely.voidwaitForSelectedId(java.lang.String selectLocator, java.lang.String idPattern)Waits until the ID of at least one selected option of the given select matches the given pattern.voidwaitForSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Waits until the option of the given select at the given index is selected.voidwaitForSelectedLabel(java.lang.String selectLocator, java.lang.String labelPattern)Waits until the label of at least one selected option of the given select matches the given pattern.voidwaitForSelectedValue(java.lang.String selectLocator, java.lang.String valuePattern)Waits until the value of at least one selected option of the given select matches the given pattern.voidwaitForStyle(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.voidwaitForText(java.lang.String elementLocator, java.lang.String text)Waits for the given text embedded in the given element.voidwaitForTextPresent(java.lang.String text)Waits for the given text to appear.voidwaitForTitle(java.lang.String title)Waits for the given page title.voidwaitForValue(java.lang.String elementLocator, java.lang.String value)Waits for the given value in the given element.voidwaitForVisible(java.lang.String elementLocator)Waits until the given element becomes visible.voidwaitForXpathCount(java.lang.String xpath, int count)Waits for the number of elements matching the given XPath expression is equal to the given count.voidwaitForXpathCount(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.
-
-
-
Method Detail
-
addSelection
void 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
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
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
void assertChecked(java.lang.String elementLocator)
Asserts that the given checkbox/radio button is checked.- Parameters:
elementLocator- the checkbox/radio button element locator
-
assertClass
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
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
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
void assertElementPresent(java.lang.String elementLocator)
Asserts that the given element is present.- Parameters:
elementLocator- locator identifying the element that should be present
-
assertEval
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
void assertLoadTime(long loadTime)
Asserts that the time needed to load a page does not exceed the given value.- Parameters:
loadTime- maximum load time in milliseconds
-
assertLoadTime
void assertLoadTime(java.lang.String loadTime)
Asserts that the time needed to load a page does not exceed the given value.- Parameters:
loadTime- maximum load time in milliseconds
-
assertNotAttribute
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
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
void assertNotChecked(java.lang.String elementLocator)
Asserts that the given checkbox/radio button is unchecked.- Parameters:
elementLocator- the checkbox/radio button element locator
-
assertNotClass
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
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
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
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
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
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
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
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
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
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
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
void assertNotTextPresent(java.lang.String text)
Asserts that the given text is not present on the page.- Parameters:
text- the text that should NOT be present
-
assertNotTitle
void assertNotTitle(java.lang.String title)
Asserts that the page title does not match the given title.- Parameters:
title- the title that should not match
-
assertNotValue
void assertNotValue(java.lang.String elementLocator, java.lang.String valuePattern)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 doesn't match the given value.- Parameters:
elementLocator- locator identifying the element whose value doesn't match the given valuevaluePattern- the value that doesn't match the given element's value
-
assertNotVisible
void assertNotVisible(java.lang.String elementLocator)
Asserts that the given element is invisible.- Parameters:
elementLocator- the element locator.
-
assertNotXpathCount
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
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
void assertPageSize(long pageSize)
Asserts that the size of the actual page (including images etc.) does not exceed the given value.- Parameters:
pageSize- the number of bytes the page size must not exceed
-
assertPageSize
void assertPageSize(java.lang.String pageSize)
Asserts that the size of the actual page (including images etc.) does not exceed the given value.- Parameters:
pageSize- the number of bytes the page size must not exceed
-
assertSelectedId
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- ID pattern
-
assertSelectedIndex
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
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
-
assertSelectedValue
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
-
assertStyle
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
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
void assertTextPresent(java.lang.String text)
Asserts that the given text is present.- Parameters:
text- the text that should be present
-
assertTitle
void assertTitle(java.lang.String title)
Asserts that the given title matches the page title.- Parameters:
title- the title that should match the page title
-
assertValue
void assertValue(java.lang.String elementLocator, java.lang.String valuePattern)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 should match the given valuevaluePattern- the value that should match the given element's value
-
assertVisible
void assertVisible(java.lang.String elementLocator)
Asserts that the given element is visible.- Parameters:
elementLocator- the element locator
-
assertXpathCount
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
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
void check(java.lang.String elementLocator)
Checks/toggles the given element.- Parameters:
elementLocator- locator identifying the element to be checked/toggled
-
checkAndWait
void checkAndWait(java.lang.String elementLocator)
Checks/toggles the given element and waits for some activity to complete.- Parameters:
elementLocator- locator identifying the element to be checked/toggled
-
click
void click(java.lang.String elementLocator)
Clicks the given element.- Parameters:
elementLocator- locator identifying the element to be clicked.
-
clickAndWait
void clickAndWait(java.lang.String elementLocator)
Clicks the given element and waits for some activity to complete.- Parameters:
elementLocator- locator identifying the element to be clicked
-
close
void close()
Closes the browser.
-
contextMenu
void contextMenu(java.lang.String elementLocator)
Simulates a right-click on the given element.- Parameters:
elementLocator- locator identifying the element to fire events at
-
contextMenuAt
void 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
void 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
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
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
void deleteAllVisibleCookies()
Removes all cookies visible to the current page.
-
deleteCookie
void deleteCookie(java.lang.String name)
Removes the cookie with the specified name.- Parameters:
name- the cookie's name
-
deleteCookie
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
void doubleClick(java.lang.String elementLocator)
Double-clicks the given element.- Parameters:
elementLocator- locator identifying the element to be double-clicked
-
doubleClickAndWait
void doubleClickAndWait(java.lang.String elementLocator)
Double-clicks the given element and waits for some activity to complete.- Parameters:
elementLocator- locator identifying the element to be double-clicked
-
echo
void echo(java.lang.String message)
Prints the given message to the log.- Parameters:
message- the message to print
-
mouseDown
void 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
void 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
void 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
void mouseMove(java.lang.String elementLocator)
Moves the mouse to the given element.- Parameters:
elementLocator- locator identifying the target element
-
mouseMoveAt
void 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
void 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
void mouseOut(java.lang.String elementLocator)
Moves the mouse out of the element's bounding box.- Parameters:
elementLocator- locator identifying the target element
-
mouseOver
void mouseOver(java.lang.String elementLocator)
Hovers the mouse over an element.- Parameters:
elementLocator- locator identifying the target element
-
mouseUp
void mouseUp(java.lang.String elementLocator)
Releases the left mouse button on an element.- Parameters:
elementLocator- locator identifying the target element
-
mouseUpAt
void 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
void 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
void open(java.lang.String pageUrlString)
Opens the given URL.- Parameters:
pageUrlString- the URL to open
-
pause
void pause(long waitingTime)
Waits the given time.- Parameters:
waitingTime- the time in milliseconds to wait
-
pause
void pause(java.lang.String waitingTime)
Waits the given time.- Parameters:
waitingTime- the time in milliseconds to wait
-
removeSelection
void 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
void 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
void 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
void selectFrame(java.lang.String frameTarget)
Selects the given frame.- Parameters:
frameTarget- the frame to be selected
-
selectWindow
void selectWindow()
Selects the top-level window.
-
selectWindow
void selectWindow(java.lang.String windowTarget)
Selects the given window.- Parameters:
windowTarget- the window to be selected
-
setTimeout
void setTimeout(long timeout)
Sets the timeout to the given value.- Parameters:
timeout- the new timeout in milliseconds
-
setTimeout
void setTimeout(java.lang.String timeout)
Sets the timeout to the given value.- Parameters:
timeout- the new timeout in milliseconds
-
startAction
void startAction(java.lang.String actionName)
Starts a new action using the given name.- Parameters:
actionName- the name of the action
-
store
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
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
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
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
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 name
-
storeText
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
void storeTitle(java.lang.String variableName)
Stores the title of the currently active document to the given variable.- Parameters:
variableName- the variable
-
storeValue
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
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
void submit(java.lang.String form)
Submits the given form.- Parameters:
form- the form to submit
-
submitAndWait
void submitAndWait(java.lang.String form)
Submits the given form and waits for some activity to complete.- Parameters:
form- the form to submit
-
type
void type(java.lang.String elementLocator, java.lang.String text)Types the given text into the given input field.- Parameters:
elementLocator- locator identifying the input fieldtext- the text to be typed
-
typeAndWait
void 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
void uncheck(java.lang.String elementLocator)
Unchecks the given checkbox/radio button.- Parameters:
elementLocator- locator identifying the checkbox/radio button
-
uncheckAndWait
void uncheckAndWait(java.lang.String elementLocator)
Unchecks the given checkbox/radio button and waits for a page load.- Parameters:
elementLocator- locator identifying the checkbox/radio button
-
waitForAttribute
void 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
void 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
void waitForChecked(java.lang.String elementLocator)
Waits until the given checkbox/radio button becomes checked.- Parameters:
elementLocator- the checkbox/radio button element locator
-
waitForClass
void 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
void 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
void 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
void waitForElementPresent(java.lang.String elementLocator)
Waits for the given element to appear.- Parameters:
elementLocator- locator identifying the element to wait for
-
waitForEval
void 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
void 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
void 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
void waitForNotChecked(java.lang.String elementLocator)
Waits until the given checkbox/radio button becomes unchecked.- Parameters:
elementLocator- the checkbox/radio button element locator
-
waitForNotClass
void 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
void 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
void 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
void waitForNotElementPresent(java.lang.String elementLocator)
Waits for the given element to disappear.- Parameters:
elementLocator- locator identifying the element to disappear
-
waitForNotEval
void 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
void waitForNotSelectedId(java.lang.String selectLocator, java.lang.String idPattern)Waits until no ID of all selected options of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatoridPattern- the ID pattern
-
waitForNotSelectedIndex
void 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
void waitForNotSelectedLabel(java.lang.String selectLocator, java.lang.String labelPattern)Waits until no label of all selected options of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatorlabelPattern- the label pattern
-
waitForNotSelectedValue
void waitForNotSelectedValue(java.lang.String selectLocator, java.lang.String valuePattern)Waits until no value of all selected options of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatorvaluePattern- the value pattern
-
waitForNotStyle
void 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
void 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
void waitForNotTextPresent(java.lang.String text)
Waits for the given text to disappear/change.- Parameters:
text- the text that should disappear/change
-
waitForNotTitle
void waitForNotTitle(java.lang.String title)
Waits for the given page title change.- Parameters:
title- the page title that should change
-
waitForNotValue
void 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 changevalue- the value that should change/disappear
-
waitForNotVisible
void waitForNotVisible(java.lang.String elementLocator)
Waits until the given element becomes invisible.- Parameters:
elementLocator- the element locator
-
waitForNotXpathCount
void 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
void 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
void waitForPageToLoad()
Waits for the page to be loaded completely.
-
waitForPopUp
void waitForPopUp()
Waits for any pop-up window to be loaded completely.
-
waitForPopUp
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
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
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
void waitForSelectedId(java.lang.String selectLocator, java.lang.String idPattern)Waits until the ID of at least one selected option of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatoridPattern- the ID pattern
-
waitForSelectedIndex
void waitForSelectedIndex(java.lang.String selectLocator, java.lang.String indexPattern)Waits until the option of the given select at the given index is selected.- Parameters:
selectLocator- the select element locatorindexPattern- the option index pattern
-
waitForSelectedLabel
void waitForSelectedLabel(java.lang.String selectLocator, java.lang.String labelPattern)Waits until the label of at least one selected option of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatorlabelPattern- the label pattern
-
waitForSelectedValue
void waitForSelectedValue(java.lang.String selectLocator, java.lang.String valuePattern)Waits until the value of at least one selected option of the given select matches the given pattern.- Parameters:
selectLocator- the select element locatorvaluePattern- the value pattern
-
waitForStyle
void 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
void 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
void waitForTextPresent(java.lang.String text)
Waits for the given text to appear.- Parameters:
text- the text to wait for
-
waitForTitle
void waitForTitle(java.lang.String title)
Waits for the given page title.- Parameters:
title- the page title to wait for
-
waitForValue
void 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
void waitForVisible(java.lang.String elementLocator)
Waits until the given element becomes visible.- Parameters:
elementLocator- the element locator
-
waitForXpathCount
void 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
void 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
-
-