|
void
|
beginAt(URL initialURL, TestContext context)
Begin a dialog with an initial URL and test client context.
|
|
void
|
checkCheckbox(String checkBoxName, String value)
|
|
void
|
checkCheckbox(String checkBoxName)
Select a specified checkbox.
|
|
void
|
clickButton(String buttonId)
Click the indicated button (input type=button).
|
|
void
|
clickButtonWithText(String buttonValueText)
|
|
void
|
clickElementByXPath(String xpath)
|
|
void
|
clickLink(String anID)
Navigate by submitting a request based on a link with a given ID.
|
|
void
|
clickLinkWithExactText(String linkText, int index)
|
|
void
|
clickLinkWithImage(String imageFileName, int index)
Navigate by submitting a request based on a link with a given image file name.
|
|
void
|
clickLinkWithText(String linkText, int index)
|
|
void
|
clickRadioOption(String radioGroup, String radioOption)
Clicks a radio option.
|
|
void
|
closeBrowser()
|
|
void
|
closeWindow()
|
|
HtmlButton
|
getButtonWithText(String buttonValueText)
|
|
List
|
getCookies()
|
|
HtmlPage
|
getCurrentPage()
|
|
String
|
getCurrentPageTitle()
Return the page title of the current response page, encoded as specified by the current
net.sourceforge.jwebunit.util.TestContext.
|
|
HtmlElement
|
getElement(String anID)
|
|
String
|
getElementAttributByXPath(String xpath, String attribut)
|
|
String
|
getElementTextByXPath(String xpath)
|
|
HtmlForm
|
getForm()
Return the current form active for the dialog.
|
|
String
|
getHiddenFieldValue(String paramName)
Return the current value of a hidden input element with name paramName.
|
|
HtmlTable
|
getHtmlTable(String tableSummaryOrId)
Return the HttpUnit WebTable object representing a specified table in the current response.
|
|
InputStream
|
getInputStream()
|
|
InputStream
|
getInputStream(URL resourceUrl)
|
|
String
|
getPageSource()
|
|
String
|
getPageText()
|
|
String
|
getPageTitle()
|
|
URL
|
getPageURL()
|
|
HtmlResetInput
|
getResetButton(String buttonName)
|
|
String
|
getSelectOptionLabelForValue(String selectName, String value)
|
|
String
|
getSelectOptionValueForLabel(String selectName, String label)
|
|
String[]
|
getSelectOptionValues(String selectName)
Return a string array of select box option values.
|
|
String[]
|
getSelectedOptions(String selectName)
|
|
String
|
getSelectedRadio(String radioGroup)
|
|
String
|
getServerResponse()
|
|
ClickableElement
|
getSubmitButton(String buttonName)
Return the HtmlUnit submit button with a given name.
|
|
ClickableElement
|
getSubmitButton(String buttonName, String buttonValue)
Return the HtmlUnit submit button with a given name and value.
|
|
Table
|
getTable(String tableSummaryOrId)
|
|
TestContext
|
getTestContext()
|
|
String
|
getTextFieldValue(String paramName)
Return the current value of a text input element with name paramName.
|
|
int
|
getWindowCount()
|
|
void
|
gotoFrame(String frameNameOrId)
|
|
void
|
gotoPage(URL initialURL)
|
|
void
|
gotoRootWindow()
Make the root window in the current conversation active.
|
|
void
|
gotoWindow(String windowName)
Make the window with the given name in the current conversation active.
|
|
void
|
gotoWindow(int windowID)
|
|
void
|
gotoWindowByTitle(String title)
Goto first window with the given title.
|
|
boolean
|
hasButton(String buttonId)
Returns if the button identified by buttonId is present.
|
|
boolean
|
hasButtonWithText(String text)
Checks if a button with text is present.
|
|
boolean
|
hasElement(String anID)
|
|
boolean
|
hasElementByXPath(String xpath)
|
|
boolean
|
hasForm()
Return true if the current response contains a form.
|
|
boolean
|
hasForm(String nameOrID)
Return true if the current response contains a specific form.
|
|
boolean
|
hasFormInputNamed(String inputName)
Return true if a form parameter (input element) is present on the current response.
|
|
boolean
|
hasFormParameterNamed(String paramName)
|
|
boolean
|
hasFormSelectNamed(String selectName)
Return true if a form parameter (input element) is present on the current response.
|
|
boolean
|
hasFrame(String frameNameOrId)
|
|
boolean
|
hasLink(String anId)
Return true if a link is present in the current response with the specified id.
|
|
boolean
|
hasLinkWithExactText(String linkText, int index)
|
|
boolean
|
hasLinkWithImage(String imageFileName, int index)
|
|
boolean
|
hasLinkWithText(String linkText, int index)
Return true if a link is present in the current response containing the specified text (note that HttpUnit uses
contains rather than an exact match - if this is a problem consider using ids on the links to uniquely identify
them).
|
|
boolean
|
hasRadioOption(String radioGroup, String radioOption)
Return true if a radio group contains the indicated option.
|
|
boolean
|
hasResetButton()
|
|
boolean
|
hasResetButton(String buttonName)
|
|
boolean
|
hasSelectOption(String selectName, String optionLabel)
Return true if a select box contains the indicated option.
|
|
boolean
|
hasSelectOptionValue(String selectName, String optionValue)
Return true if a select box contains the indicated option.
|
|
boolean
|
hasSubmitButton(String buttonName, String buttonValue)
|
|
boolean
|
hasSubmitButton(String buttonName)
|
|
boolean
|
hasSubmitButton()
|
|
boolean
|
hasTable(String tableSummaryOrId)
|
|
boolean
|
hasWindow(String windowName)
|
|
boolean
|
hasWindowByTitle(String title)
|
|
void
|
initWebClient()
|
|
boolean
|
isCheckboxSelected(String checkBoxName, String checkBoxValue)
|
|
boolean
|
isCheckboxSelected(String checkBoxName)
|
|
boolean
|
isMatchInElement(String elementID, String regexp)
|
|
boolean
|
isTextInElement(String elementID, String text)
|
|
boolean
|
isTextInTable(String tableSummaryOrId, String text)
Return true if given text is present in a specified table of the response.
|
|
void
|
reset()
Reset the current form.
|
|
void
|
selectOptions(String selectName, String[] options)
|
|
void
|
setExpectedJavaScriptAlert(JavascriptAlert[] alerts)
|
|
void
|
setExpectedJavaScriptConfirm(JavascriptConfirm[] confirms)
|
|
void
|
setExpectedJavaScriptPrompt(JavascriptPrompt[] prompts)
|
|
void
|
setScriptingEnabled(boolean value)
|
|
void
|
setTextField(String fieldName, String text)
Set a form text, password input element or textarea to the provided value.
|
|
void
|
setWorkingForm(int index)
|
|
void
|
setWorkingForm(String nameOrId, int index)
|
|
void
|
submit()
Submit the current form with the default submit button.
|
|
void
|
submit(String buttonName, String buttonValue)
Submit the current form with the specifed submit button (by name and value).
|
|
void
|
submit(String buttonName)
Submit the current form with the specifed submit button.
|
|
void
|
uncheckCheckbox(String checkBoxName, String value)
|
|
void
|
uncheckCheckbox(String checkBoxName)
Deselect a specified checkbox.
|
|
void
|
unselectOptions(String selectName, String[] options)
|