| java.lang.Object | |||
| ↳ | junit.framework.Assert | ||
| ↳ | junit.framework.TestCase | ||
| ↳ | com.atlassian.confluence.ThreadLocalWebTestCase | ||
Known Direct Subclasses
|
This is a copy of net.sourceforge.jwebunit.junit.WebTestCase (version 1.4.1). This version differs from the original in that it stores its net.sourceforge.jwebunit.junit.WebTester in a thread local instead of a local field. This provides thread safety over the tester if multiple threads share this test case (which is the case with TestNG).
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Assert that a button with a given id is not present in the current window.
| |||||||||||
Assert that a button with a given text is not present in the current window.
| |||||||||||
Assert that a button with a given id is present in the current window.
| |||||||||||
Assert that a button with a given text is present in the current window.
| |||||||||||
Assert that a given checkbox is not present.
| |||||||||||
Assert that a form checkbox with a given name is not present.
| |||||||||||
Assert that a specific checkbox is not selected.
| |||||||||||
Assert that a specific checkbox is not selected.
| |||||||||||
Assert that a given checkbox is present.
| |||||||||||
Assert that a form checkbox with a given name is present.
| |||||||||||
Assert that a specific checkbox is selected.
| |||||||||||
Assert that a specific checkbox is selected.
| |||||||||||
Checks to see if a cookie is present in the response.
| |||||||||||
Check to see if a cookie has the given value.
| |||||||||||
Check to see if a cookie value match the given regexp.
| |||||||||||
Download the current page (or file) and compare it with the given file.
| |||||||||||
Assert that an element with a given id is not present.
| |||||||||||
Assert that an element with a given xpath is not present.
| |||||||||||
Assert that an element with a given id is present.
| |||||||||||
Assert that an element with a given xpath is present.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
Assert that a form input element with a given name is not present.
| |||||||||||
Assert that a form input element with a given name is present.
| |||||||||||
Assert that there is not a form present.
| |||||||||||
Assert that there is not a form with the specified name or id present.
| |||||||||||
Assert that there is a form with the specified name or id present.
| |||||||||||
Assert that there is a form present.
| |||||||||||
Assert that a frame with the given name or ID is present.
| |||||||||||
Assert that an input hidden element with name
formElementName has the expectedValue
value. | |||||||||||
Asserts that the image with the given src and alt attribute values exist in the page and is an actual reachable
image, then saves it as png with the given file name.
| |||||||||||
Assert that the value of a given web resource is present in a specific
table.
| |||||||||||
Assert that the value of a given web resource is present in a specific table.
| |||||||||||
Assert that the value of a given web resource is not present in a specific table.
| |||||||||||
Assert that a web resource's value is not present.
| |||||||||||
Assert that a web resource's formatted value is not present.
| |||||||||||
Assert that a web resource's value is present.
| |||||||||||
Assert that a web resource's value (with formatting) is present
| |||||||||||
Assert that the values of a set of web resources are all present in a specific table.
| |||||||||||
Assert that the values of a set of web resources are all present in a
specific table.
| |||||||||||
Assert that no link with the given id is present in the response.
| |||||||||||
Assert that no link containing the Exact text is present.
| |||||||||||
Assert that no link containing the Exact text is present.
| |||||||||||
Assert that a link containing a specified image is not present.
| |||||||||||
Assert that no link containing the supplied text is present.
| |||||||||||
Assert that no link containing the supplied text is present.
| |||||||||||
Assert that a link with a given id is present in the response.
| |||||||||||
Assert that a link containing the Exact text is present.
| |||||||||||
Assert that a link containing the Exact text is present.
| |||||||||||
Assert that a link containing a specified image is present.
| |||||||||||
Assert that a link containing the supplied text is present.
| |||||||||||
Assert that a link containing the supplied text is present.
| |||||||||||
Assert that supplied regexp is matched.
| |||||||||||
Assert that a given element matches a specific regexp.
| |||||||||||
Assert that a set of regexp values are all matched in a specific table.
| |||||||||||
Assert that supplied regexp is matched in a specific table.
| |||||||||||
Assert that supplied regexp is not present.
| |||||||||||
Assert that a given element does not match a specific regexp.
| |||||||||||
Assert that supplied regexp is not present in a specific table.
| |||||||||||
Assert that none of a set of regexp values are present in a specific table.
| |||||||||||
Assert that a specific option is not present in a radio group.
| |||||||||||
Assert that a specific option is not selected in a radio group.
| |||||||||||
Assert that a specific option is present in a radio group.
| |||||||||||
Assert that a specific option is selected in a radio group.
| |||||||||||
Assert that no reset button is present in the current form.
| |||||||||||
Assert that a reset button with a given name is not present.
| |||||||||||
Assert that a reset button is present.
| |||||||||||
Assert that a reset button with a given name is present.
| |||||||||||
Assert that a specific option is not present in a select box.
| |||||||||||
Assert that a specific option is present in a select box (by label).
| |||||||||||
Assert that a specific option is present in a select box (by value).
| |||||||||||
Assert that the values of a select element's options match a given array of strings.
| |||||||||||
Assert that the values of a select element's options do not match a given array of strings.
| |||||||||||
Assert that given options are present in a select box (by value).
| |||||||||||
Assert that the display values of a select element's options match a given array of strings.
| |||||||||||
Assert that the display values of a select element's options do not match a given array of strings.
| |||||||||||
Assert that given options are present in a select box (by label).
| |||||||||||
Assert that the currently selected value of a select box matches given value.
| |||||||||||
Assert that the currently selected value(s) of a select box matches given value(s).
| |||||||||||
Assert that the currently selected display label(s) of a select box matches given label(s).
| |||||||||||
Assert that the currently selected display value(s) of a select box matches a given value(s).
| |||||||||||
Assert that a submit button with a given name is not present.
| |||||||||||
Assert that no submit button is present in the current form.
| |||||||||||
Assert that a submit button with a given name and value is present.
| |||||||||||
Assert that a submit button with a given name is present.
| |||||||||||
Assert that a submit button is present.
| |||||||||||
Assert that a specific table matches a matrix of supplied text values.
| |||||||||||
Assert that a specific table matches an ExpectedTable.
| |||||||||||
Assert that a specific table matches a matrix of supplied regexps.
| |||||||||||
Assert that a specific table matches an ExpectedTable.
| |||||||||||
Assert that a table with a given summary or id value is not present.
| |||||||||||
Assert that a table with a given summary or id value is present.
| |||||||||||
Assert that the number of rows for a specific table equals expected value.
| |||||||||||
Assert that a range of rows for a specific table matches a matrix of supplied text values.
| |||||||||||
Assert that a range of rows for a specific table matches a matrix of supplied text values.
| |||||||||||
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
| |||||||||||
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
| |||||||||||
Assert that an input text element with name
formElementName has the expectedValue
value. | |||||||||||
Assert that a given element contains specific text.
| |||||||||||
Assert that a set of text values are all present in a specific table.
| |||||||||||
Assert that supplied text is present in a specific table.
| |||||||||||
Assert that supplied text is not present in a specific table.
| |||||||||||
Assert that none of a set of text values are present in a specific table.
| |||||||||||
Assert that supplied text is not present.
| |||||||||||
Assert that supplied text is present.
| |||||||||||
Assert title of current html page in conversation matches an expected
value.
| |||||||||||
Assert title of current html page matches the value of a specified web
resource.
| |||||||||||
Assert title of current page matches formatted message resource
| |||||||||||
Assert title of current html page in conversation matches an expected regexp.
| |||||||||||
Assert that the number of opened windows equals given value.
| |||||||||||
Assert that a window with the given name is open.
| |||||||||||
Assert that a window with the given ID is open.
| |||||||||||
Assert that at least one window with the given title is open.
| |||||||||||
Begin conversation at a URL absolute or relative to base URL.
| |||||||||||
Select a specified checkbox.
| |||||||||||
Select a specified checkbox.
| |||||||||||
Click the button with the given id.
| |||||||||||
Clicks a button with
text of the value attribute. | |||||||||||
Click element with given xpath.
| |||||||||||
Navigate by selection of a link with given id.
| |||||||||||
Navigate by selecting Nth link with the exact given text.
| |||||||||||
Navigate by selection of a link with the exact given text.
| |||||||||||
Navigate by selection of a link with a given image.
| |||||||||||
Navigate by selection of a link containing given text.
| |||||||||||
Navigate by selecting Nth link containing given text.
| |||||||||||
Clicks a radio option.
| |||||||||||
Close the current conversation.
| |||||||||||
Close the current window.
| |||||||||||
Print all the cookies to stdout.
| |||||||||||
This method is deprecated.
Use
getPageSource()
| |||||||||||
This method is deprecated.
Use
getPageSource()
| |||||||||||
Dump the table as the 2D array that is used for assertions - for debugging purposes.
| |||||||||||
Dump the table as the 2D array that is used for assertions - for debugging purposes.
| |||||||||||
This method is deprecated.
You should not use plugin specific fonctionality. Please ask for a new core feature instead.
| |||||||||||
Get the attribut value of the gicen element.
| |||||||||||
Get text of the given element.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
Return the value of a web resource based on its key.
| |||||||||||
Return the value of a web resource based on its key, using MessageFormat
to perform parametric substitution with formatting.
| |||||||||||
Get the source of the HTML page (like in a real browser), or HTTP body for a non HTML content.
| |||||||||||
Get the last data sent by the server.
| |||||||||||
Provide access to test testContext.
| |||||||||||
Get internal WebTester.
| |||||||||||
Gets the Testing Engine Key that is used to find the proper testing engine class (HtmlUnitDialog /
SeleniumDialog) for the tests.
| |||||||||||
Make the given frame active.
| |||||||||||
Go to the given page like if user has typed the URL manually in the browser.
| |||||||||||
Make the root window active.
| |||||||||||
Make a given window active.
| |||||||||||
Make a given window active.
| |||||||||||
Make first window with the given title active.
| |||||||||||
Reset the current form using the default reset button.
| |||||||||||
Clean up unused memory.
| |||||||||||
Save the last downloaded page (or file) to the disk.
| |||||||||||
Select an option with a given display label in a select element.
| |||||||||||
Select an option with a given value in a select element.
| |||||||||||
Select options with given display labels in a select element.
| |||||||||||
Select options with given values in a select element.
| |||||||||||
Set the testing engine.
| |||||||||||
Tell that the given alert boxe is expected.
| |||||||||||
Tell that the given alert boxes are expected in the given order.
| |||||||||||
Tell that the given confirm boxes are expected in the given order.
| |||||||||||
Tell that the given confirm boxe is expected.
| |||||||||||
Tell that the given prompt boxes are expected in the given order.
| |||||||||||
Tell that the given prompt boxe is expected.
| |||||||||||
This method is deprecated.
use setTextField or other methods
| |||||||||||
Enable or disable Javascript support
| |||||||||||
Allows setting an external test testContext class that might be extended from TestContext.
| |||||||||||
Set the Testing Engine that you want to use for the tests based on the Testing Engine Key.
| |||||||||||
Set the value of a text or password input field.
| |||||||||||
Begin interaction with a specified form.
| |||||||||||
Begin interaction with a specified form.
| |||||||||||
Begin interaction with a specified form.
| |||||||||||
Submit the form by pressing the named button with the given value (label).
| |||||||||||
Submit form by pressing named button.
| |||||||||||
Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on
the form.
| |||||||||||
Deselect a specified checkbox.
| |||||||||||
Deselect a specified checkbox.
| |||||||||||
For use on those few occasions when the exception might be recoverable, but we still want to see what went wrong.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
junit.framework.TestCase
| |||||||||||
From class
junit.framework.Assert
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
junit.framework.Test
| |||||||||||
Assert that a button with a given id is not present in the current window.
Assert that a button with a given text is not present in the current window.
| text | Text representation of button content. |
|---|
Assert that a button with a given id is present in the current window.
A button can be the following HTML
elements:
Assert that a button with a given text is present in the current window.
| text | Text representation of button content. |
|---|
Assert that a given checkbox is not present.
| checkboxName | checkbox name. |
|---|---|
| checkboxValue | checkbox value attribut. |
Assert that a form checkbox with a given name is not present.
| checkboxName | checkbox name. |
|---|
Assert that a specific checkbox is not selected.
Assert that a specific checkbox is not selected.
Assert that a given checkbox is present.
| checkboxName | checkbox name attribut. |
|---|---|
| checkboxValue | checkbox value attribut. |
Assert that a form checkbox with a given name is present.
| checkboxName | checkbox name. |
|---|
Assert that a specific checkbox is selected.
Assert that a specific checkbox is selected.
Checks to see if a cookie is present in the response.
| cookieName | The cookie name |
|---|
Check to see if a cookie has the given value.
| cookieName | The cookie name |
|---|---|
| expectedValue | The cookie value |
Check to see if a cookie value match the given regexp.
| cookieName | The cookie name |
|---|---|
| regexp | The regexp |
Download the current page (or file) and compare it with the given file.
| expected | Expected file URL. |
|---|
Assert that an element with a given id is not present.
| anID | element id to test for. |
|---|
Assert that an element with a given xpath is not present.
| xpath | element xpath to test for. |
|---|
Assert that an element with a given id is present.
| anID | element id to test for. |
|---|
Assert that an element with a given xpath is present.
| xpath | element xpath to test for. |
|---|
This method is deprecated.
No replacement.
Assert that a form element had no value / is empty.
This method is deprecated.
No replacement.
Assert that a specific form element has an expected value. Can be used to check hidden input.
This method is deprecated.
No replacement.
Assert that a specific form element matches an expected regexp.
Assert that a form input element with a given name is not present.
Assert that a form input element with a given name is present.
Assert that there is not a form present.
Assert that there is not a form with the specified name or id present.
Assert that there is a form with the specified name or id present.
Assert that there is a form present.
Assert that a frame with the given name or ID is present.
| frameNameOrId | Name or ID of the frame. ID is checked first. |
|---|
Assert that an input hidden element with name formElementName has the expectedValue
value.
| formElementName | the value of the name attribute of the element |
|---|---|
| expectedValue | the expected value of the given input element |
Asserts that the image with the given src and alt attribute values exist in the page and is an actual reachable image, then saves it as png with the given file name.
| imageSrc | as it appears in the html page, i.e. relative to the current page. |
|---|
Assert that the value of a given web resource is present in a specific table.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| key | web resource name |
Assert that the value of a given web resource is present in a specific table.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| key | web resource name |
Assert that the value of a given web resource is not present in a specific table.
| tableSummaryOrId | summary, name or id attribute value of table |
|---|---|
| key | web resource name |
Assert that a web resource's value is not present.
| key | web resource name |
|---|
Assert that a web resource's formatted value is not present.
| key | web resource name |
|---|
Assert that a web resource's value is present.
| key | web resource name |
|---|
Assert that a web resource's value (with formatting) is present
Assert that the values of a set of web resources are all present in a specific table.
| tableSummaryOrId | summary, name or id attribute value of table |
|---|---|
| keys | Array of web resource names. |
Assert that the values of a set of web resources are all present in a specific table.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| keys | Array of web resource names. |
Assert that no link with the given id is present in the response.
Assert that no link containing the Exact text is present.
| index | The 0-based index, when more than one link with the same text is expected. |
|---|
Assert that no link containing the Exact text is present.
Assert that a link containing a specified image is not present.
| imageFileName | A suffix of the image's filename; for example, to match "images/my_icon.png", you could just pass in "my_icon.png". |
|---|
Assert that no link containing the supplied text is present.
Assert that no link containing the supplied text is present.
| index | The 0-based index, when more than one link with the same text is expected. |
|---|
Assert that a link with a given id is present in the response.
Assert that a link containing the Exact text is present.
Assert that a link containing the Exact text is present.
| index | The 0-based index, when more than one link with the same text is expected. |
|---|
Assert that a link containing a specified image is present.
| imageFileName | A suffix of the image's filename; for example, to match "images/my_icon.png", you could just pass in "my_icon.png". |
|---|
Assert that a link containing the supplied text is present.
| index | The 0-based index, when more than one link with the same text is expected. |
|---|
Assert that a link containing the supplied text is present.
Assert that a given element matches a specific regexp.
| elementID | id of element to be inspected. |
|---|---|
| regexp | to match. |
Assert that a set of regexp values are all matched in a specific table.
| tableSummaryOrId | summary, name or id attribute value of table |
|---|---|
| regexp | Array of expected regexps to match. |
Assert that supplied regexp is matched in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|
Assert that a given element does not match a specific regexp.
| elementID | id of element to be inspected. |
|---|---|
| regexp | to match. |
Assert that supplied regexp is not present in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| regexp | regular expression string expected not to match data in any table cell |
Assert that none of a set of regexp values are present in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| regexp | Array of text values |
Assert that a specific option is not present in a radio group.
| name | radio group name. |
|---|---|
| radioOption | option to test for. |
Assert that a specific option is not selected in a radio group.
| name | radio group name. |
|---|---|
| radioOption | option to test for selection. |
Assert that a specific option is present in a radio group.
| name | radio group name. |
|---|---|
| radioOption | option to test for. |
Assert that a specific option is selected in a radio group.
| name | radio group name. |
|---|---|
| radioOption | option to test for selection. |
Assert that no reset button is present in the current form.
A reset button can be the following HTML
elements:
Assert that a reset button with a given name is not present.
A reset button can be the following HTML
elements:
Assert that a reset button is present.
A reset button can be the following HTML elements:
Assert that a reset button with a given name is present.
A reset button can be the following HTML elements:
Assert that a specific option is not present in a select box.
| selectName | name of the select element. |
|---|---|
| optionLabel | option label. |
Assert that a specific option is present in a select box (by label).
| selectName | name of the select element. |
|---|---|
| optionLabel | option label. |
Assert that a specific option is present in a select box (by value).
| selectName | name of the select element. |
|---|---|
| optionValue | option value. |
Assert that the values of a select element's options match a given array of strings.
| selectName | name of the select element. |
|---|---|
| expectedValues | expected values for the select box. |
Assert that the values of a select element's options do not match a given array of strings.
| selectName | name of the select element. |
|---|---|
| optionValues | expected values for the select box. |
Assert that given options are present in a select box (by value).
| selectName | name of the select element. |
|---|---|
| optionValues | option labels. |
Assert that the display values of a select element's options match a given array of strings.
| selectName | name of the select element. |
|---|---|
| expectedOptions | expected labels for the select box. |
Assert that the display values of a select element's options do not match a given array of strings.
| selectName | name of the select element. |
|---|---|
| expectedOptions | expected display values for the select box. |
Assert that given options are present in a select box (by label).
| selectName | name of the select element. |
|---|---|
| optionLabels | option labels. |
Assert that the currently selected value of a select box matches given value.
| selectName | name of the select element. |
|---|---|
| value | expected value of the selected option. |
Assert that the currently selected value(s) of a select box matches given value(s).
| selectName | name of the select element. |
|---|---|
| values | expected value(s) of the selected option. |
Assert that the currently selected display label(s) of a select box matches given label(s).
| selectName | name of the select element. |
|---|---|
| labels | expected display label(s) of the selected option. |
Assert that the currently selected display value(s) of a select box matches a given value(s).
| selectName | name of the select element. |
|---|---|
| regexps | expected display value of the selected option. |
Assert that a submit button with a given name is not present.
A submit button can be the following HTML
elements:
Assert that no submit button is present in the current form.
A submit button can be the following HTML
elements:
Assert that a submit button with a given name and value is present.
A submit button can be the following
HTML elements:
Assert that a submit button with a given name is present.
A submit button can be the following HTML
elements:
Assert that a submit button is present.
A submit button can be the following HTML elements:
Assert that a specific table matches a matrix of supplied text values.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| expectedCellValues | double dimensional array of expected values |
Assert that a specific table matches an ExpectedTable.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| expectedTable | represents expected values (colspan supported). |
Assert that a specific table matches a matrix of supplied regexps.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| expectedCellValues | double dimensional array of expected regexps |
Assert that a specific table matches an ExpectedTable.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| expectedTable | represents expected regexps (colspan supported). |
Assert that a table with a given summary or id value is not present.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|
Assert that a table with a given summary or id value is present.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|
Assert that the number of rows for a specific table equals expected value.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| expectedRowCount | expected row count. |
Assert that a range of rows for a specific table matches a matrix of supplied text values.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| startRow | index of start row for comparison |
| expectedTable | represents expected values (colspan and rowspan supported). |
Assert that a range of rows for a specific table matches a matrix of supplied text values.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| startRow | index of start row for comparison |
| expectedTable | represents expected values (colspan and rowspan supported). |
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| startRow | index of start row for comparison |
| expectedTable | represents expected regexps (colspan and rowspan supported). |
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
| tableSummaryOrId | summary or id attribute value of table |
|---|---|
| startRow | index of start row for comparison |
| expectedTable | represents expected regexps (colspan and rowspan not supported). |
Assert that an input text element with name formElementName has the expectedValue
value.
| formElementName | the value of the name attribute of the element |
|---|---|
| expectedValue | the expected value of the given input element |
Assert that a given element contains specific text.
| elementID | id of element to be inspected. |
|---|---|
| text | to check for. |
Assert that a set of text values are all present in a specific table.
| tableSummaryOrId | summary, name or id attribute value of table |
|---|---|
| text | Array of expected text values. |
Assert that supplied text is present in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|
Assert that supplied text is not present in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|
Assert that none of a set of text values are present in a specific table.
| tableSummaryNameOrId | summary, name or id attribute value of table |
|---|---|
| text | Array of text values |
Assert title of current html page in conversation matches an expected value.
| title | expected title value |
|---|
Assert title of current html page matches the value of a specified web resource.
| titleKey | web resource key for title |
|---|
Assert title of current page matches formatted message resource
Assert title of current html page in conversation matches an expected regexp.
| regexp | expected title regexp |
|---|
Assert that the number of opened windows equals given value.
| windowCount | Window count |
|---|
Assert that a window with the given name is open.
Assert that a window with the given ID is open.
| windowID | Javascript window ID. |
|---|
Assert that at least one window with the given title is open.
Begin conversation at a URL absolute or relative to base URL. Use
getTestContext().setBaseUrl(String) to define base URL. Absolute URL
should start with "http://", "https://" or "www.".
| aRelativeURL | absolute or relative URL (relative to base URL). |
|---|
| TestingEngineResponseException | If something bad happend (404) |
|---|
Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked.
| checkBoxName | name of checkbox to be selected. |
|---|---|
| value | value of checkbox to be selected. |
Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked.
| checkBoxName | name of checkbox to be selected. |
|---|
Click the button with the given id.
| buttonId | Button ID attribut value. |
|---|
Clicks a button with text of the value attribute.
| buttonValueText | The text of the button (contents of the value attribute). |
|---|
Click element with given xpath.
| xpath | xpath of the element. |
|---|
Navigate by selection of a link with given id.
| linkId | id of link |
|---|
Navigate by selecting Nth link with the exact given text.
| linkText | Text of the link. |
|---|---|
| index | The 0-based index, when more than one link with the same text is expected. |
Navigate by selection of a link with the exact given text.
| linkText | Text of the link. |
|---|
Navigate by selection of a link with a given image.
| imageFileName | A suffix of the image's filename; for example, to match "images/my_icon.png", you could just pass in "my_icon.png". |
|---|
Navigate by selection of a link containing given text.
| linkText | Text in the link. |
|---|
Navigate by selecting Nth link containing given text.
| linkText | Text in the link. |
|---|---|
| index | The 0-based index, when more than one link with the same text is expected. |
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. |
Close the current conversation.
Close the current window.
Print all the cookies to stdout.
This method is deprecated.
Use getPageSource()
Dump html of current response to System.out - for debugging purposes.
This method is deprecated.
Use getPageSource()
Dump html of current response to a specified stream - for debugging purposes.
Dump the table as the 2D array that is used for assertions - for debugging purposes.
Dump the table as the 2D array that is used for assertions - for debugging purposes.
This method is deprecated.
You should not use plugin specific fonctionality. Please ask for a new core feature instead.
Provides access to the testing engine for subclasses - in case functionality not yet wrapped is required by a test.
If the dialog is not explicitly set the jWebUnit framework will default to using the orignal testing engine, which is, htmlunit.Get the attribut value of the gicen element. For example, if you have img src="bla.gif" alt="toto", getElementAttributByXPath("//img[@src='bla.gif']", "alt") returns "toto"
| xpath | XPath of the element. |
|---|---|
| attribut | Name of the attribut. |
Get text of the given element.
| xpath | xpath of the element. |
|---|
This method is deprecated.
No replacement.
Return the value of a web resource based on its key. This translates to a property file lookup with the locale based on the current TestContext.
| key | name of the web resource. |
|---|
Return the value of a web resource based on its key, using MessageFormat to perform parametric substitution with formatting.
| key | name of the web resource. |
|---|---|
| args | array of arguments to be formatted into message |
Get the source of the HTML page (like in a real browser), or HTTP body for a non HTML content.
Get the last data sent by the server.
Provide access to test testContext.
Get internal WebTester.
Gets the Testing Engine Key that is used to find the proper testing engine class (HtmlUnitDialog / SeleniumDialog) for the tests.
Make the given frame active.
| frameNameOrId | Name or ID of the frame. ID is checked first. |
|---|
Go to the given page like if user has typed the URL manually in the browser. Use
getTestContext().setBaseUrl(String) to define base URL. Absolute URL
should start with "http://", "https://" or "www.".
| url | absolute or relative URL (relative to base URL). |
|---|
| TestingEngineResponseException | If something bad happend (404) |
|---|
Make the root window active.
Make a given window active.
| windowName | Name of the window. |
|---|
Make a given window active.
| windowID | Javascript ID of the window |
|---|
Make first window with the given title active.
| title | Title of the window. |
|---|
Reset the current form using the default reset button. See setWorkingForm(int)for an explanation of how the current
form is established.
Clean up unused memory. Using setUp and tearDown is not an option for this requires the subclasses of this class to call the respective super methods. Also wrap any exceptions and include the URL and HTML for the current page.
| Throwable |
|---|
Save the last downloaded page (or file) to the disk.
| f | The file name. |
|---|
Select an option with a given display label in a select element.
| selectName | name of select element. |
|---|---|
| label | label of option to be selected. |
Select an option with a given value in a select element.
| selectName | name of select element. |
|---|---|
| value | values of options to be selected. |
Select options with given display labels in a select element.
| selectName | name of select element. |
|---|---|
| labels | labels of options to be selected. |
Select options with given values in a select element.
| selectName | name of select element. |
|---|---|
| values | values of options to be selected. |
Set the testing engine.
| aIJWebUnitDialog | Testing engine. |
|---|
Tell that the given alert boxe is expected.
| message | Message in the alert. |
|---|
Tell that the given alert boxes are expected in the given order.
| messages | Messages in the alerts. |
|---|
Tell that the given confirm boxes are expected in the given order.
| messages | Messages in the confirms. |
|---|---|
| actions | Whether we should click on "OK" (true) or "Cancel" (false) |
Tell that the given confirm boxe is expected.
| message | Message in the confirm. |
|---|---|
| action | Whether we should click on "OK" (true) or "Cancel" (false) |
Tell that the given prompt boxes are expected in the given order.
| messages | Messages in the prompts. |
|---|---|
| inputs | What we should put in the prompt (null if user press Cancel) |
Tell that the given prompt boxe is expected.
| message | Message in the prompt. |
|---|---|
| input | What we should put in the prompt (null if user press Cancel) |
This method is deprecated.
use setTextField or other methods
Set the value of a form input element.
| formElementName | name of form element. |
|---|
Enable or disable Javascript support
Allows setting an external test testContext class that might be extended from TestContext. Example: setTestContext(new CompanyATestContext());
CompanyATestContext extends TestContext.Set the Testing Engine that you want to use for the tests based on the Testing Engine Key.
| testingEngineKey | The testingEngineKey to set. |
|---|
Set the value of a text or password input field.
| inputName | name of form element. |
|---|---|
| value | value to set. |
Begin interaction with a specified form. If form interaction methods are called without explicitly calling this method first, jWebUnit will attempt to determine itself which form is being manipulated.
It is not necessary to call this method if their is only one form on the current page.| index | 0-based index of the form to work with. |
|---|
Begin interaction with a specified form. If form interaction methods are called without explicitly calling this method first, jWebUnit will attempt to determine itself which form is being manipulated.
It is not necessary to call this method if their is only one form on the current page.| nameOrId | name or id of the form to work with. |
|---|
Begin interaction with a specified form. If form interaction methods are called without explicitly calling this method first, jWebUnit will attempt to determine itself which form is being manipulated.
It is not necessary to call this method if their is only one form on the current page.| nameOrId | name or id of the form to work with. |
|---|---|
| index | The 0-based index, when more than one form with the same name is expected. |
Submit the form by pressing the named button with the given value (label). Useful if you have more than one submit button with same name.
| buttonName | Submit button name attribut value. |
|---|---|
| buttonValue | Submit button value attribut value. |
Submit form by pressing named button.
| buttonName | Submit button name attribut value. |
|---|
Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on the form.
Deselect a specified checkbox. If the checkbox is already unchecked then the checkbox will stay unchecked.
| checkBoxName | name of checkbox to be deselected. |
|---|
Deselect a specified checkbox. If the checkbox is already unchecked then the checkbox will stay unchecked.
| checkBoxName | name of checkbox to be deselected. |
|---|---|
| value | value of checkbox to be deselected. |
For use on those few occasions when the exception might be recoverable, but we still want to see what went wrong.
| runnable | The original error object |
|---|
| AssertionFailedError | A new error with the old one wrapped as a cause |
|---|