Method Summary |
|
protected boolean | areFilesEqual(URL f1, URL f2) |
public void | assertButtonNotPresent(String buttonId) Assert that a button with a given id is not present in the current window. |
public void | assertButtonNotPresentWithText(String text) Assert that a button with a given text is not present in the current window. |
public void | assertButtonPresent(String buttonId) |
public void | assertButtonPresentWithText(String text) Assert that a button with a given text is present in the current window. |
public void | assertCheckboxNotPresent(String checkboxName) Assert that a form checkbox with a given name is not present. |
public void | assertCheckboxNotPresent(String checkboxName, String checkboxValue) Assert that a given checkbox is not present. |
public void | assertCheckboxNotSelected(String checkBoxName) Assert that a specific checkbox is not selected. |
public void | assertCheckboxNotSelected(String checkBoxName, String checkBoxValue) Assert that a specific checkbox is not selected. |
public void | assertCheckboxPresent(String checkboxName) Assert that a form checkbox with a given name is present. |
public void | assertCheckboxPresent(String checkboxName, String checkboxValue) Assert that a given checkbox is present. |
public void | assertCheckboxSelected(String checkBoxName) Assert that a specific checkbox is selected. |
public void | assertCheckboxSelected(String checkBoxName, String checkBoxValue) Assert that a specific checkbox is selected. |
public void | assertCookiePresent(String cookieName) Checks to see if a cookie is present in the response. |
public void | assertCookieValueEquals(String cookieName, String expectedValue) Check to see if a cookie has the given value. |
public void | assertCookieValueMatch(String cookieName, String regexp) Check to see if a cookie value match the given regexp. |
public void | assertDownloadedFileEquals(URL expected) Download the current page (or file) and compare it with the given file. |
public void | assertElementNotPresent(String anID) Assert that an element with a given id is not present. |
public void | assertElementNotPresentByXPath(String xpath) Assert that an element with a given xpath is not present. |
public void | assertElementPresent(String anID) Assert that an element with a given id is present. |
public void | assertElementPresentByXPath(String xpath) Assert that an element with a given xpath is present. |
public void | assertFormElementEmpty(String formElementName) Assert that a form element had no value / is empty. |
public void | assertFormElementEquals(String formElementName, String expectedValue) Assert that a specific form element has an expected value. |
public void | assertFormElementMatch(String formElementName, String regexp) Assert that a specific form element matches an expected regexp. |
public void | assertFormElementNotPresent(String formElementName) Assert that a form input element with a given name is not present. |
public void | assertFormElementPresent(String formElementName) Assert that a form input element with a given name is present. |
public void | assertFormNotPresent() Assert that there is not a form present. |
public void | assertFormNotPresent(String nameOrID) Assert that there is not a form with the specified name or id present. |
public void | assertFormPresent() Assert that there is a form present. |
public void | assertFormPresent(String nameOrID) Assert that there is a form with the specified name or id present. |
public void | assertFramePresent(String frameNameOrId) Assert that a frame with the given name or ID is present.
Parameters: frameNameOrId - Name or ID of the frame. |
public void | assertHiddenFieldPresent(String formElementName, String expectedValue) Assert that an input hidden element with name formElementName has the expectedValue
value. |
public void | assertImagePresent(String imageSrc, String imageAlt) |
public void | assertImageValid(String imageSrc, String imageAlt) |
public void | assertImageValidAndStore(String imageSrc, String imageAlt, File out) 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.
Parameters: imageSrc - as it appears in the html page, i.e. |
public void | assertKeyInTable(String tableSummaryOrId, String key) Assert that the value of a given web resource is present in a specific table. |
public void | assertKeyInTable(String tableSummaryOrId, String key, Object[] args) Assert that the value of a given web resource is present in a specific
table. |
public void | assertKeyNotInTable(String tableSummaryOrId, String key) Assert that the value of a given web resource is not present in a specific table. |
public void | assertKeyNotPresent(String key) Assert that a web resource's value is not present. |
public void | assertKeyNotPresent(String key, Object[] args) Assert that a web resource's formatted value is not present. |
public void | assertKeyPresent(String key) Assert that a web resource's value is present. |
public void | assertKeyPresent(String key, Object[] args) |
public void | assertKeysInTable(String tableSummaryOrId, String[] keys) Assert that the values of a set of web resources are all present in a specific table. |
public void | assertKeysInTable(String tableSummaryOrId, String[] keys, Object[][] args) Assert that the values of a set of web resources are all present in a
specific table. |
public void | assertLinkNotPresent(String linkId) Assert that no link with the given id is present in the response. |
public void | assertLinkNotPresentWithExactText(String linkText) Assert that no link containing the Exact text is present. |
public void | assertLinkNotPresentWithExactText(String linkText, int index) Assert that no link containing the Exact text is present. |
public void | assertLinkNotPresentWithImage(String imageFileName) Assert that a link containing a specified image is not present. |
public void | assertLinkNotPresentWithText(String linkText) Assert that no link containing the supplied text is present. |
public void | assertLinkNotPresentWithText(String linkText, int index) Assert that no link containing the supplied text is present. |
public void | assertLinkPresent(String linkId) Assert that a link with a given id is present in the response. |
public void | assertLinkPresentWithExactText(String linkText) Assert that a link containing the Exact text is present. |
public void | assertLinkPresentWithExactText(String linkText, int index) Assert that a link containing the Exact text is present. |
public void | assertLinkPresentWithImage(String imageFileName) Assert that a link containing a specified image is present. |
public void | assertLinkPresentWithText(String linkText) Assert that a link containing the supplied text is present. |
public void | assertLinkPresentWithText(String linkText, int index) Assert that a link containing the supplied text is present. |
public void | assertMatch(String regexp) Assert that supplied regexp is matched. |
public void | assertMatchInElement(String elementID, String regexp) Assert that a given element matches a specific regexp. |
public void | assertMatchInTable(String tableSummaryNameOrId, String regexp) Assert that supplied regexp is matched in a specific table. |
public void | assertMatchInTable(String tableSummaryOrId, String[] regexp) Assert that a set of regexp values are all matched in a specific table. |
public void | assertNoMatch(String regexp) Assert that supplied regexp is not present. |
public void | assertNoMatchInElement(String elementID, String regexp) Assert that a given element does not match a specific regexp. |
public void | assertNoMatchInTable(String tableSummaryNameOrId, String regexp) Assert that supplied regexp is not present in a specific table. |
public void | assertNoMatchInTable(String tableSummaryNameOrId, String[] regexp) Assert that none of a set of regexp values are present in a specific table. |
public void | assertRadioOptionNotPresent(String name, String radioOption) Assert that a specific option is not present in a radio group. |
public void | assertRadioOptionNotSelected(String name, String radioOption) Assert that a specific option is not selected in a radio group. |
public void | assertRadioOptionPresent(String name, String radioOption) Assert that a specific option is present in a radio group. |
public void | assertRadioOptionSelected(String name, String radioOption) Assert that a specific option is selected in a radio group. |
public void | assertResetButtonNotPresent() |
public void | assertResetButtonNotPresent(String buttonName) |
public void | assertResetButtonPresent() Assert that a reset button is present. |
public void | assertResetButtonPresent(String buttonName) |
public void | assertSelectOptionNotPresent(String selectName, String optionLabel) Assert that a specific option is not present in a select box. |
public void | assertSelectOptionPresent(String selectName, String optionLabel) Assert that a specific option is present in a select box (by label). |
public void | assertSelectOptionValueNotPresent(String selectName, String optionValue) |
public void | assertSelectOptionValuePresent(String selectName, String optionValue) Assert that a specific option is present in a select box (by value). |
public void | assertSelectOptionValuesEqual(String selectName, String[] expectedValues) Assert that the values of a select element's options match a given array of strings. |
public void | assertSelectOptionValuesNotEqual(String selectName, String[] optionValues) Assert that the values of a select element's options do not match a given array of strings. |
public void | assertSelectOptionValuesPresent(String selectName, String[] optionValues) Assert that given options are present in a select box (by value). |
public void | assertSelectOptionsEqual(String selectName, String[] expectedOptions) Assert that the display values of a select element's options match a given array of strings. |
public void | assertSelectOptionsNotEqual(String selectName, String[] expectedOptions) Assert that the display values of a select element's options do not match a given array of strings. |
public void | assertSelectOptionsPresent(String selectName, String[] optionLabels) Assert that given options are present in a select box (by label). |
public void | assertSelectedOptionEquals(String selectName, String option) |
public void | assertSelectedOptionMatches(String selectName, String regexp) |
public void | assertSelectedOptionValueEquals(String selectName, String value) Assert that the currently selected value of a select box matches given value. |
public void | assertSelectedOptionValuesEqual(String selectName, String[] values) Assert that the currently selected value(s) of a select box matches given value(s). |
public void | assertSelectedOptionsEqual(String selectName, String[] labels) Assert that the currently selected display label(s) of a select box matches given label(s). |
public void | assertSelectedOptionsMatch(String selectName, String[] regexps) Assert that the currently selected display value(s) of a select box matches a given value(s). |
public void | assertSubmitButtonNotPresent() Assert that no submit button is present in the current form. |
public void | assertSubmitButtonNotPresent(String buttonName) Assert that a submit button with a given name is not present. |
public void | assertSubmitButtonPresent() Assert that a submit button is present. |
public void | assertSubmitButtonPresent(String buttonName) Assert that a submit button with a given name is present. |
public void | assertSubmitButtonPresent(String buttonName, String buttonValue) Assert that a submit button with a given name and value is present. |
public void | assertTableEquals(String tableSummaryNameOrId, Table expectedTable) Assert that a specific table matches an ExpectedTable. |
public void | assertTableEquals(String tableSummaryNameOrId, String[][] expectedCellValues) Assert that a specific table matches a matrix of supplied text values. |
public void | assertTableMatch(String tableSummaryOrId, Table expectedTable) Assert that a specific table matches an ExpectedTable. |
public void | assertTableMatch(String tableSummaryOrId, String[][] expectedCellValues) Assert that a specific table matches a matrix of supplied regexps. |
public void | assertTableNotPresent(String tableSummaryNameOrId) Assert that a table with a given summary or id value is not present. |
public void | assertTablePresent(String tableSummaryNameOrId) Assert that a table with a given summary or id value is present. |
public void | assertTableRowCountEquals(String tableSummaryNameOrId, int expectedRowCount) Assert that the number of rows for a specific table equals expected value. |
public void | assertTableRowsEqual(String tableSummaryNameOrId, int startRow, Table expectedTable) Assert that a range of rows for a specific table matches a matrix of supplied text values. |
public void | assertTableRowsEqual(String tableSummaryNameOrId, int startRow, String[][] expectedTable) Assert that a range of rows for a specific table matches a matrix of supplied text values. |
public void | assertTableRowsMatch(String tableSummaryOrId, int startRow, Table expectedTable) Assert that a range of rows for a specific table matches a matrix of supplied regexps. |
public void | assertTableRowsMatch(String tableSummaryOrId, int startRow, String[][] expectedTable) Assert that a range of rows for a specific table matches a matrix of supplied regexps. |
public void | assertTextFieldEquals(String formElementName, String expectedValue) Assert that an input text element with name formElementName has the expectedValue
value. |
public void | assertTextInElement(String elementID, String text) Assert that a given element contains specific text. |
public void | assertTextInTable(String tableSummaryNameOrId, String text) Assert that supplied text is present in a specific table. |
public void | assertTextInTable(String tableSummaryOrId, String[] text) Assert that a set of text values are all present in a specific table. |
public void | assertTextNotInElement(String elementID, String text) |
public void | assertTextNotInTable(String tableSummaryNameOrId, String text) Assert that supplied text is not present in a specific table. |
public void | assertTextNotInTable(String tableSummaryNameOrId, String[] text) Assert that none of a set of text values are present in a specific table. |
public void | assertTextNotPresent(String text) Assert that supplied text is not present. |
public void | assertTextPresent(String text) Assert that supplied text is present. |
public void | assertTitleEquals(String title) Assert title of current html page in conversation matches an expected
value. |
public void | assertTitleEqualsKey(String titleKey) Assert title of current html page matches the value of a specified web
resource. |
public void | assertTitleEqualsKey(String titleKey, Object[] args) |
public void | assertTitleMatch(String regexp) Assert title of current html page in conversation matches an expected regexp. |
public void | assertWindowCountEquals(int windowCount) Assert that the number of opened windows equals given value. |
public void | assertWindowPresent(String windowName) Assert that a window with the given name is open. |
public void | assertWindowPresent(int windowID) Assert that a window with the given ID is open. |
public void | assertWindowPresentWithTitle(String title) Assert that at least one window with the given title is open. |
public void | beginAt(String aRelativeURL) Begin conversation at a URL absolute or relative to base URL. |
public void | checkCheckbox(String checkBoxName) Select a specified checkbox. |
public void | checkCheckbox(String checkBoxName, String value) Select a specified checkbox. |
public void | clickButton(String buttonId) Click the button with the given id. |
public void | clickButtonWithText(String buttonValueText) Clicks a button with text of the value attribute. |
public void | clickElementByXPath(String xpath) Click element with given xpath. |
public void | clickLink(String linkId) Navigate by selection of a link with given id. |
public void | clickLinkWithExactText(String linkText) Navigate by selection of a link with the exact given text. |
public void | clickLinkWithExactText(String linkText, int index) Navigate by selecting Nth link with the exact given text. |
public void | clickLinkWithImage(String imageFileName) Navigate by selection of a link with a given image. |
public void | clickLinkWithText(String linkText) Navigate by selection of a link containing given text. |
public void | clickLinkWithText(String linkText, int index) Navigate by selecting Nth link containing given text. |
public void | clickRadioOption(String radioGroup, String radioOption) Clicks a radio option. |
public void | closeBrowser() Close the current conversation. |
public void | closeWindow() Close the current window. |
public void | dumpCookies() Print all the cookies to stdout. |
public void | dumpHtml() Dump html of current response to System.out - for debugging purposes. |
public void | dumpHtml(PrintStream stream) Dump html of current response to a specified stream - for debugging purposes. |
public void | dumpTable(String tableNameOrId) Dump the table as the 2D array that is used for assertions - for debugging purposes. |
public void | dumpTable(String tableNameOrId, PrintStream stream) Dump the table as the 2D array that is used for assertions - for debugging purposes. |
public IJWebUnitDialog | getDialog() Provides access to the testing engine for subclasses - in case functionality not yet wrappered required by test. |
public String | getElementAttributByXPath(String xpath, String attribut) Get the attribut value of the gicen element. |
public String | getElementTextByXPath(String xpath) Get text of the given element. |
public String | getFormElementValue(String formElementName) |
public Image | getImage(String imageSrc, String imageAlt) |
public String | getMessage(String key) Return the value of a web resource based on its key. |
public String | getMessage(String key, Object[] args) Return the value of a web resource based on its key, using MessageFormat
to perform parametric substitution with formatting. |
public String | getPageSource() Get the source of the HTML page (like in a real browser), or HTTP body for a non HTML content. |
public String | getServeurResponse() Get the last data sent by the server. |
public Table | getTable(String tableSummaryNameOrId) |
public TestContext | getTestContext() Provide access to test testContext. |
protected IJWebUnitDialog | getTestingEngine() Protected version of deprecated getDialog(). |
public String | getTestingEngineKey() Gets the Testing Engine Key that is used to find the proper testing engine class (HtmlUnitDialog /
SeleniumDialog) for the tests. |
public void | gotoFrame(String frameNameOrId) Make the given frame active.
Parameters: frameNameOrId - Name or ID of the frame. |
public void | gotoPage(String url) Go to the given page like if user has typed the URL manually in the browser. |
public void | gotoRootWindow() Make the root window active. |
public void | gotoWindow(String windowName) Make a given window active. |
public void | gotoWindow(int windowID) Make a given window active. |
public void | gotoWindowByTitle(String title) Make first window with the given title active. |
protected IJWebUnitDialog | initializeDialog() Initializes the IJWebUnitDialog when the dialog is null. |
public void | reset() Reset the current form using the default reset button. |
public void | saveAs(File f) Save the last downloaded page (or file) to the disk. |
public void | selectOption(String selectName, String label) Select an option with a given display label in a select element. |
public void | selectOptionByValue(String selectName, String value) Select an option with a given value in a select element. |
public void | selectOptions(String selectName, String[] labels) Select options with given display labels in a select element. |
public void | selectOptionsByValues(String selectName, String[] values) Select options with given values in a select element. |
public void | setDialog(IJWebUnitDialog aIJWebUnitDialog) Set the testing engine. |
public void | setExpectedJavaScriptAlert(String message) Tell that the given alert boxe is expected. |
public void | setExpectedJavaScriptAlert(String[] messages) Tell that the given alert boxes are expected in the given order. |
public void | setExpectedJavaScriptConfirm(String message, boolean action) Tell that the given confirm boxe is expected. |
public void | setExpectedJavaScriptConfirm(String[] messages, boolean[] actions) Tell that the given confirm boxes are expected in the given order. |
public void | setExpectedJavaScriptPrompt(String message, String input) Tell that the given prompt boxe is expected. |
public void | setExpectedJavaScriptPrompt(String[] messages, String[] inputs) Tell that the given prompt boxes are expected in the given order. |
public void | setFormElement(String formElementName, String value) Set the value of a form input element. |
public void | setScriptingEnabled(boolean value) |
public void | setTestContext(TestContext aTestContext) Allows setting an external test testContext class that might be extended from TestContext. |
public void | setTestingEngineKey(String testingEngineKey) Set the Testing Engine that you want to use for the tests based on the Testing Engine Key. |
public void | setTextField(String inputName, String value) Set the value of a text or password input field. |
public void | setWorkingForm(int index) Begin interaction with a specified form. |
public void | setWorkingForm(String nameOrId) Begin interaction with a specified form. |
public void | setWorkingForm(String nameOrId, int index) Begin interaction with a specified form. |
public void | submit() Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on
the form. |
public void | submit(String buttonName) Submit form by pressing named button. |
public void | submit(String buttonName, String buttonValue) Submit the form by pressing the named button with the given value (label). |
public void | uncheckCheckbox(String checkBoxName) Deselect a specified checkbox. |
public void | uncheckCheckbox(String checkBoxName, String value) Deselect a specified checkbox. |