| java.lang.Object | |
| ↳ | com.atlassian.confluence.htmlunit.HtmlUnitDialog |
Known Direct Subclasses
|
An exact copy of net.sourceforge.jwebunit.htmlunit.HtmlUnitDialog from JWebUnit 1.4.1-atlassian-1,
with some private methods and fields changed to protected to ConfluenceHtmlUnitDialog
can override them.
Don't change this class, except to change private methods or fields to protected.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| expectedJavascriptAlerts | Javascript alerts. | ||||||||||
| expectedJavascriptConfirms | Javascript confirms. | ||||||||||
| expectedJavascriptPrompts | Javascript prompts. | ||||||||||
| form | The currently selected form. | ||||||||||
| jsEnabled | Is Javascript enabled. | ||||||||||
| wc | Encapsulate browser abilities. | ||||||||||
| win | The currently selected window. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Begin a dialog with an initial URL and test client context.
| |||||||||||
Select a specified checkbox.
| |||||||||||
Click the indicated button (input type=button).
| |||||||||||
Navigate by submitting a request based on a link with a given ID.
| |||||||||||
Navigate by submitting a request based on a link with a given image file name.
| |||||||||||
Clicks a radio option.
| |||||||||||
Return the page title of the current response page, encoded as specified by the current
net.sourceforge.jwebunit.util.TestContext.
| |||||||||||
Return the current value of a hidden input element with name
paramName. | |||||||||||
Return the HttpUnit WebTable object representing a specified table in the current response.
| |||||||||||
Return a string array of select box option values.
| |||||||||||
Return the HtmlUnit submit button with a given name.
| |||||||||||
Return the HtmlUnit submit button with a given name and value.
| |||||||||||
Return the current value of a text input element with name
paramName. | |||||||||||
Make the root window in the current conversation active.
| |||||||||||
Make the window with the given name in the current conversation active.
| |||||||||||
Goto first window with the given title.
| |||||||||||
Returns if the button identified by
buttonId is present. | |||||||||||
Checks if a button with
text is present. | |||||||||||
Return true if the current response contains a form.
| |||||||||||
Return true if the current response contains a specific form.
| |||||||||||
Return true if a form parameter (input element) is present on the current response.
| |||||||||||
Return true if a form parameter (input element) is present on the current response.
| |||||||||||
Return true if a link is present in the current response with the specified id.
| |||||||||||
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).
| |||||||||||
Return true if a radio group contains the indicated option.
| |||||||||||
Return true if a select box contains the indicated option.
| |||||||||||
Return true if a select box contains the indicated option.
| |||||||||||
Return true if given text is present in a specified table of the response.
| |||||||||||
Reset the current form.
| |||||||||||
Set a form text, password input element or textarea to the provided value.
| |||||||||||
Submit the current form with the default submit button.
| |||||||||||
Submit the current form with the specifed submit button (by name and value).
| |||||||||||
Submit the current form with the specifed submit button.
| |||||||||||
Deselect a specified checkbox.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return the current form active for the dialog. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
net.sourceforge.jwebunit.api.IJWebUnitDialog
| |||||||||||
The currently selected form.
Is Javascript enabled.
Encapsulate browser abilities.
The currently selected window.
Begin a dialog with an initial URL and test client context.
| initialURL | absolute url at which to begin dialog. |
|---|---|
| context | contains context information for the test client. |
| TestingEngineResponseException |
|---|
Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked.
| checkBoxName | name of checkbox to be deselected. |
|---|
Navigate by submitting a request based on a link with a given ID. A RuntimeException is thrown if no such link can be found.
| anID | id of link to be navigated. |
|---|
Navigate by submitting a request based on a link with a given image file name. A RuntimeException is thrown if no such link can be found.
| imageFileName | A suffix of the image's filename; for example, to match "images/my_icon.png", you could just pass in "my_icon.png". |
|---|
Clicks a radio option. Asserts that the radio option exists first. *
| radioGroup | name of the radio group. |
|---|---|
| radioOption | value of the option to check for. |
| ExpectedJavascriptAlertException | |
|---|---|
| ExpectedJavascriptConfirmException | |
| ExpectedJavascriptPromptException |
Return the page title of the current response page, encoded as specified by the current net.sourceforge.jwebunit.util.TestContext.
Return the current value of a hidden input element with name paramName.
| paramName | name of the input element. TODO: Find a way to handle multiple hidden input element with same name. |
|---|
Return the HttpUnit WebTable object representing a specified table in the current response. Null is returned if a parsing exception occurs looking for the table or no table with the id or summary could be found. tableSummaryOrId can also match on the class of a table if its unique.
| tableSummaryOrId | summary, class or id of the table to return. |
|---|
Return a string array of select box option values.
| selectName | name of the select box. |
|---|
Return the HtmlUnit submit button with a given name.
| buttonName | name of button. |
|---|
Return the HtmlUnit submit button with a given name and value.
| buttonName | button name. |
|---|---|
| buttonValue | button value. |
Return the current value of a text input element with name paramName.
| paramName | name of the input element. TODO: Find a way to handle multiple text input element with same name. |
|---|
Make the root window in the current conversation active.
Make the window with the given name in the current conversation active.
Returns if the button identified by buttonId is present.
| buttonId | the id of the button |
|---|
true when the button was found.
Checks if a button with text is present.
| text | the text of the button (between <button></button>). |
|---|
true when the button with text could be found.
Return true if the current response contains a form.
Return true if the current response contains a specific form.
| nameOrID | name of id of the form to check for. |
|---|
Return true if a form parameter (input element) is present on the current response.
| inputName | name of the input element to check for |
|---|
Return true if a form parameter (input element) is present on the current response.
| selectName | name of the input element to check for |
|---|
Return true if a link is present in the current response with the specified id.
| anId | link id to check for. |
|---|
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).
| linkText | text to check for in links on the response. |
|---|---|
| index | The 0-based index, when more than one link with the same text is expected. |
Return true if a radio group contains the indicated option.
| radioGroup | name of the radio group. |
|---|---|
| radioOption | value of the option to check for. |
Return true if a select box contains the indicated option.
| selectName | name of the select box. |
|---|---|
| optionLabel | label of the option. |
Return true if a select box contains the indicated option.
| selectName | name of the select box. |
|---|---|
| optionValue | value of the option. |
Return true if given text is present in a specified table of the response.
| tableSummaryOrId | table summary or id to inspect for expected text. |
|---|---|
| text | expected text to check for. |
Reset the current form. See getForm()for an explanation of how the current form is established.
| ExpectedJavascriptAlertException |
|---|
| ExpectedJavascriptConfirmException |
|---|
| ExpectedJavascriptPromptException |
|---|
Set a form text, password input element or textarea to the provided value.
| fieldName | name of the input element or textarea |
|---|---|
| text | parameter value to submit for the element. |
Submit the current form with the default submit button. See getForm()for an explanation of how the
current form is established.
Submit the current form with the specifed submit button (by name and value). See getForm()for an
explanation of how the current form is established.
| buttonName | name of the button to use for submission. |
|---|---|
| buttonValue | value/label of the button to use for submission |
Submit the current form with the specifed submit button. See getForm()for an explanation of how the
current form is established.
| buttonName | name of the button to use for submission. |
|---|
Deselect a specified checkbox. If the checkbox is already unchecked then the checkbox will stay unchecked.
| checkBoxName | name of checkbox to be deselected. |
|---|
Return the current form active for the dialog.
The active form can also be explicitly set by setWorkingForm(int).
If this method is called without the form having been implicitly or explicitly set, it will attempt to return the default first form on the page.
| UnableToSetFormException | This runtime assertion failure will be raised if there is no form on the response. |
|---|