Java Doc for WebTester.java in  » Testing » jwebunit » net » sourceforge » jwebunit » junit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » jwebunit » net.sourceforge.jwebunit.junit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.jwebunit.junit.WebTester

WebTester
public class WebTester (Code)
Provides a high-level API for basic web application navigation and validation by providing JUnit assertions. It supports use of a property file for web resources (a la Struts), though a resource file for the app is not required.
author:
   Julien Henry
author:
   Jim Weaver
author:
   Wilkes Joiner




Method Summary
protected  booleanareFilesEqual(URL f1, URL f2)
    
public  voidassertButtonNotPresent(String buttonId)
     Assert that a button with a given id is not present in the current window.
public  voidassertButtonNotPresentWithText(String text)
     Assert that a button with a given text is not present in the current window.
public  voidassertButtonPresent(String buttonId)
    
public  voidassertButtonPresentWithText(String text)
     Assert that a button with a given text is present in the current window.
public  voidassertCheckboxNotPresent(String checkboxName)
     Assert that a form checkbox with a given name is not present.
public  voidassertCheckboxNotPresent(String checkboxName, String checkboxValue)
     Assert that a given checkbox is not present.
public  voidassertCheckboxNotSelected(String checkBoxName)
     Assert that a specific checkbox is not selected.
public  voidassertCheckboxNotSelected(String checkBoxName, String checkBoxValue)
     Assert that a specific checkbox is not selected.
public  voidassertCheckboxPresent(String checkboxName)
     Assert that a form checkbox with a given name is present.
public  voidassertCheckboxPresent(String checkboxName, String checkboxValue)
     Assert that a given checkbox is present.
public  voidassertCheckboxSelected(String checkBoxName)
     Assert that a specific checkbox is selected.
public  voidassertCheckboxSelected(String checkBoxName, String checkBoxValue)
     Assert that a specific checkbox is selected.
public  voidassertCookiePresent(String cookieName)
     Checks to see if a cookie is present in the response.
public  voidassertCookieValueEquals(String cookieName, String expectedValue)
     Check to see if a cookie has the given value.
public  voidassertCookieValueMatch(String cookieName, String regexp)
     Check to see if a cookie value match the given regexp.
public  voidassertDownloadedFileEquals(URL expected)
     Download the current page (or file) and compare it with the given file.
public  voidassertElementNotPresent(String anID)
     Assert that an element with a given id is not present.
public  voidassertElementNotPresentByXPath(String xpath)
     Assert that an element with a given xpath is not present.
public  voidassertElementPresent(String anID)
     Assert that an element with a given id is present.
public  voidassertElementPresentByXPath(String xpath)
     Assert that an element with a given xpath is present.
public  voidassertFormElementEmpty(String formElementName)
     Assert that a form element had no value / is empty.
public  voidassertFormElementEquals(String formElementName, String expectedValue)
     Assert that a specific form element has an expected value.
public  voidassertFormElementMatch(String formElementName, String regexp)
     Assert that a specific form element matches an expected regexp.
public  voidassertFormElementNotPresent(String formElementName)
     Assert that a form input element with a given name is not present.
public  voidassertFormElementPresent(String formElementName)
     Assert that a form input element with a given name is present.
public  voidassertFormNotPresent()
     Assert that there is not a form present.
public  voidassertFormNotPresent(String nameOrID)
     Assert that there is not a form with the specified name or id present.
public  voidassertFormPresent()
     Assert that there is a form present.
public  voidassertFormPresent(String nameOrID)
     Assert that there is a form with the specified name or id present.
public  voidassertFramePresent(String frameNameOrId)
     Assert that a frame with the given name or ID is present.
Parameters:
  frameNameOrId - Name or ID of the frame.
public  voidassertHiddenFieldPresent(String formElementName, String expectedValue)
     Assert that an input hidden element with name formElementName has the expectedValue value.
public  voidassertImagePresent(String imageSrc, String imageAlt)
    
public  voidassertImageValid(String imageSrc, String imageAlt)
    
public  voidassertImageValidAndStore(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  voidassertKeyInTable(String tableSummaryOrId, String key)
     Assert that the value of a given web resource is present in a specific table.
public  voidassertKeyInTable(String tableSummaryOrId, String key, Object[] args)
     Assert that the value of a given web resource is present in a specific table.
public  voidassertKeyNotInTable(String tableSummaryOrId, String key)
     Assert that the value of a given web resource is not present in a specific table.
public  voidassertKeyNotPresent(String key)
     Assert that a web resource's value is not present.
public  voidassertKeyNotPresent(String key, Object[] args)
     Assert that a web resource's formatted value is not present.
public  voidassertKeyPresent(String key)
     Assert that a web resource's value is present.
public  voidassertKeyPresent(String key, Object[] args)
    
public  voidassertKeysInTable(String tableSummaryOrId, String[] keys)
     Assert that the values of a set of web resources are all present in a specific table.
public  voidassertKeysInTable(String tableSummaryOrId, String[] keys, Object[][] args)
     Assert that the values of a set of web resources are all present in a specific table.
public  voidassertLinkNotPresent(String linkId)
     Assert that no link with the given id is present in the response.
public  voidassertLinkNotPresentWithExactText(String linkText)
     Assert that no link containing the Exact text is present.
public  voidassertLinkNotPresentWithExactText(String linkText, int index)
     Assert that no link containing the Exact text is present.
public  voidassertLinkNotPresentWithImage(String imageFileName)
     Assert that a link containing a specified image is not present.
public  voidassertLinkNotPresentWithText(String linkText)
     Assert that no link containing the supplied text is present.
public  voidassertLinkNotPresentWithText(String linkText, int index)
     Assert that no link containing the supplied text is present.
public  voidassertLinkPresent(String linkId)
     Assert that a link with a given id is present in the response.
public  voidassertLinkPresentWithExactText(String linkText)
     Assert that a link containing the Exact text is present.
public  voidassertLinkPresentWithExactText(String linkText, int index)
     Assert that a link containing the Exact text is present.
public  voidassertLinkPresentWithImage(String imageFileName)
     Assert that a link containing a specified image is present.
public  voidassertLinkPresentWithText(String linkText)
     Assert that a link containing the supplied text is present.
public  voidassertLinkPresentWithText(String linkText, int index)
     Assert that a link containing the supplied text is present.
public  voidassertMatch(String regexp)
     Assert that supplied regexp is matched.
public  voidassertMatchInElement(String elementID, String regexp)
     Assert that a given element matches a specific regexp.
public  voidassertMatchInTable(String tableSummaryNameOrId, String regexp)
     Assert that supplied regexp is matched in a specific table.
public  voidassertMatchInTable(String tableSummaryOrId, String[] regexp)
     Assert that a set of regexp values are all matched in a specific table.
public  voidassertNoMatch(String regexp)
     Assert that supplied regexp is not present.
public  voidassertNoMatchInElement(String elementID, String regexp)
     Assert that a given element does not match a specific regexp.
public  voidassertNoMatchInTable(String tableSummaryNameOrId, String regexp)
     Assert that supplied regexp is not present in a specific table.
public  voidassertNoMatchInTable(String tableSummaryNameOrId, String[] regexp)
     Assert that none of a set of regexp values are present in a specific table.
public  voidassertRadioOptionNotPresent(String name, String radioOption)
     Assert that a specific option is not present in a radio group.
public  voidassertRadioOptionNotSelected(String name, String radioOption)
     Assert that a specific option is not selected in a radio group.
public  voidassertRadioOptionPresent(String name, String radioOption)
     Assert that a specific option is present in a radio group.
public  voidassertRadioOptionSelected(String name, String radioOption)
     Assert that a specific option is selected in a radio group.
public  voidassertResetButtonNotPresent()
    
public  voidassertResetButtonNotPresent(String buttonName)
    
public  voidassertResetButtonPresent()
     Assert that a reset button is present.
public  voidassertResetButtonPresent(String buttonName)
    
public  voidassertSelectOptionNotPresent(String selectName, String optionLabel)
     Assert that a specific option is not present in a select box.
public  voidassertSelectOptionPresent(String selectName, String optionLabel)
     Assert that a specific option is present in a select box (by label).
public  voidassertSelectOptionValueNotPresent(String selectName, String optionValue)
    
public  voidassertSelectOptionValuePresent(String selectName, String optionValue)
     Assert that a specific option is present in a select box (by value).
public  voidassertSelectOptionValuesEqual(String selectName, String[] expectedValues)
     Assert that the values of a select element's options match a given array of strings.
public  voidassertSelectOptionValuesNotEqual(String selectName, String[] optionValues)
     Assert that the values of a select element's options do not match a given array of strings.
public  voidassertSelectOptionValuesPresent(String selectName, String[] optionValues)
     Assert that given options are present in a select box (by value).
public  voidassertSelectOptionsEqual(String selectName, String[] expectedOptions)
     Assert that the display values of a select element's options match a given array of strings.
public  voidassertSelectOptionsNotEqual(String selectName, String[] expectedOptions)
     Assert that the display values of a select element's options do not match a given array of strings.
public  voidassertSelectOptionsPresent(String selectName, String[] optionLabels)
     Assert that given options are present in a select box (by label).
public  voidassertSelectedOptionEquals(String selectName, String option)
    
public  voidassertSelectedOptionMatches(String selectName, String regexp)
    
public  voidassertSelectedOptionValueEquals(String selectName, String value)
     Assert that the currently selected value of a select box matches given value.
public  voidassertSelectedOptionValuesEqual(String selectName, String[] values)
     Assert that the currently selected value(s) of a select box matches given value(s).
public  voidassertSelectedOptionsEqual(String selectName, String[] labels)
     Assert that the currently selected display label(s) of a select box matches given label(s).
public  voidassertSelectedOptionsMatch(String selectName, String[] regexps)
     Assert that the currently selected display value(s) of a select box matches a given value(s).
public  voidassertSubmitButtonNotPresent()
     Assert that no submit button is present in the current form.
public  voidassertSubmitButtonNotPresent(String buttonName)
     Assert that a submit button with a given name is not present.
public  voidassertSubmitButtonPresent()
     Assert that a submit button is present.
public  voidassertSubmitButtonPresent(String buttonName)
     Assert that a submit button with a given name is present.
public  voidassertSubmitButtonPresent(String buttonName, String buttonValue)
     Assert that a submit button with a given name and value is present.
public  voidassertTableEquals(String tableSummaryNameOrId, Table expectedTable)
     Assert that a specific table matches an ExpectedTable.
public  voidassertTableEquals(String tableSummaryNameOrId, String[][] expectedCellValues)
     Assert that a specific table matches a matrix of supplied text values.
public  voidassertTableMatch(String tableSummaryOrId, Table expectedTable)
     Assert that a specific table matches an ExpectedTable.
public  voidassertTableMatch(String tableSummaryOrId, String[][] expectedCellValues)
     Assert that a specific table matches a matrix of supplied regexps.
public  voidassertTableNotPresent(String tableSummaryNameOrId)
     Assert that a table with a given summary or id value is not present.
public  voidassertTablePresent(String tableSummaryNameOrId)
     Assert that a table with a given summary or id value is present.
public  voidassertTableRowCountEquals(String tableSummaryNameOrId, int expectedRowCount)
     Assert that the number of rows for a specific table equals expected value.
public  voidassertTableRowsEqual(String tableSummaryNameOrId, int startRow, Table expectedTable)
     Assert that a range of rows for a specific table matches a matrix of supplied text values.
public  voidassertTableRowsEqual(String tableSummaryNameOrId, int startRow, String[][] expectedTable)
     Assert that a range of rows for a specific table matches a matrix of supplied text values.
public  voidassertTableRowsMatch(String tableSummaryOrId, int startRow, Table expectedTable)
     Assert that a range of rows for a specific table matches a matrix of supplied regexps.
public  voidassertTableRowsMatch(String tableSummaryOrId, int startRow, String[][] expectedTable)
     Assert that a range of rows for a specific table matches a matrix of supplied regexps.
public  voidassertTextFieldEquals(String formElementName, String expectedValue)
     Assert that an input text element with name formElementName has the expectedValue value.
public  voidassertTextInElement(String elementID, String text)
     Assert that a given element contains specific text.
public  voidassertTextInTable(String tableSummaryNameOrId, String text)
     Assert that supplied text is present in a specific table.
public  voidassertTextInTable(String tableSummaryOrId, String[] text)
     Assert that a set of text values are all present in a specific table.
public  voidassertTextNotInElement(String elementID, String text)
    
public  voidassertTextNotInTable(String tableSummaryNameOrId, String text)
     Assert that supplied text is not present in a specific table.
public  voidassertTextNotInTable(String tableSummaryNameOrId, String[] text)
     Assert that none of a set of text values are present in a specific table.
public  voidassertTextNotPresent(String text)
     Assert that supplied text is not present.
public  voidassertTextPresent(String text)
     Assert that supplied text is present.
public  voidassertTitleEquals(String title)
     Assert title of current html page in conversation matches an expected value.
public  voidassertTitleEqualsKey(String titleKey)
     Assert title of current html page matches the value of a specified web resource.
public  voidassertTitleEqualsKey(String titleKey, Object[] args)
    
public  voidassertTitleMatch(String regexp)
     Assert title of current html page in conversation matches an expected regexp.
public  voidassertWindowCountEquals(int windowCount)
     Assert that the number of opened windows equals given value.
public  voidassertWindowPresent(String windowName)
     Assert that a window with the given name is open.
public  voidassertWindowPresent(int windowID)
     Assert that a window with the given ID is open.
public  voidassertWindowPresentWithTitle(String title)
     Assert that at least one window with the given title is open.
public  voidbeginAt(String aRelativeURL)
     Begin conversation at a URL absolute or relative to base URL.
public  voidcheckCheckbox(String checkBoxName)
     Select a specified checkbox.
public  voidcheckCheckbox(String checkBoxName, String value)
     Select a specified checkbox.
public  voidclickButton(String buttonId)
     Click the button with the given id.
public  voidclickButtonWithText(String buttonValueText)
     Clicks a button with text of the value attribute.
public  voidclickElementByXPath(String xpath)
     Click element with given xpath.
public  voidclickLink(String linkId)
     Navigate by selection of a link with given id.
public  voidclickLinkWithExactText(String linkText)
     Navigate by selection of a link with the exact given text.
public  voidclickLinkWithExactText(String linkText, int index)
     Navigate by selecting Nth link with the exact given text.
public  voidclickLinkWithImage(String imageFileName)
     Navigate by selection of a link with a given image.
public  voidclickLinkWithText(String linkText)
     Navigate by selection of a link containing given text.
public  voidclickLinkWithText(String linkText, int index)
     Navigate by selecting Nth link containing given text.
public  voidclickRadioOption(String radioGroup, String radioOption)
     Clicks a radio option.
public  voidcloseBrowser()
     Close the current conversation.
public  voidcloseWindow()
     Close the current window.
public  voiddumpCookies()
     Print all the cookies to stdout.
public  voiddumpHtml()
     Dump html of current response to System.out - for debugging purposes.
public  voiddumpHtml(PrintStream stream)
     Dump html of current response to a specified stream - for debugging purposes.
public  voiddumpTable(String tableNameOrId)
     Dump the table as the 2D array that is used for assertions - for debugging purposes.
public  voiddumpTable(String tableNameOrId, PrintStream stream)
     Dump the table as the 2D array that is used for assertions - for debugging purposes.
public  IJWebUnitDialoggetDialog()
     Provides access to the testing engine for subclasses - in case functionality not yet wrappered required by test.
public  StringgetElementAttributByXPath(String xpath, String attribut)
     Get the attribut value of the gicen element.
public  StringgetElementTextByXPath(String xpath)
     Get text of the given element.
public  StringgetFormElementValue(String formElementName)
    
public  ImagegetImage(String imageSrc, String imageAlt)
    
public  StringgetMessage(String key)
     Return the value of a web resource based on its key.
public  StringgetMessage(String key, Object[] args)
     Return the value of a web resource based on its key, using MessageFormat to perform parametric substitution with formatting.
public  StringgetPageSource()
     Get the source of the HTML page (like in a real browser), or HTTP body for a non HTML content.
public  StringgetServeurResponse()
     Get the last data sent by the server.
public  TablegetTable(String tableSummaryNameOrId)
    
public  TestContextgetTestContext()
     Provide access to test testContext.
protected  IJWebUnitDialoggetTestingEngine()
     Protected version of deprecated getDialog().
public  StringgetTestingEngineKey()
     Gets the Testing Engine Key that is used to find the proper testing engine class (HtmlUnitDialog / SeleniumDialog) for the tests.
public  voidgotoFrame(String frameNameOrId)
     Make the given frame active.
Parameters:
  frameNameOrId - Name or ID of the frame.
public  voidgotoPage(String url)
     Go to the given page like if user has typed the URL manually in the browser.
public  voidgotoRootWindow()
     Make the root window active.
public  voidgotoWindow(String windowName)
     Make a given window active.
public  voidgotoWindow(int windowID)
     Make a given window active.
public  voidgotoWindowByTitle(String title)
     Make first window with the given title active.
protected  IJWebUnitDialoginitializeDialog()
     Initializes the IJWebUnitDialog when the dialog is null.
public  voidreset()
     Reset the current form using the default reset button.
public  voidsaveAs(File f)
     Save the last downloaded page (or file) to the disk.
public  voidselectOption(String selectName, String label)
     Select an option with a given display label in a select element.
public  voidselectOptionByValue(String selectName, String value)
     Select an option with a given value in a select element.
public  voidselectOptions(String selectName, String[] labels)
     Select options with given display labels in a select element.
public  voidselectOptionsByValues(String selectName, String[] values)
     Select options with given values in a select element.
public  voidsetDialog(IJWebUnitDialog aIJWebUnitDialog)
     Set the testing engine.
public  voidsetExpectedJavaScriptAlert(String message)
     Tell that the given alert boxe is expected.
public  voidsetExpectedJavaScriptAlert(String[] messages)
     Tell that the given alert boxes are expected in the given order.
public  voidsetExpectedJavaScriptConfirm(String message, boolean action)
     Tell that the given confirm boxe is expected.
public  voidsetExpectedJavaScriptConfirm(String[] messages, boolean[] actions)
     Tell that the given confirm boxes are expected in the given order.
public  voidsetExpectedJavaScriptPrompt(String message, String input)
     Tell that the given prompt boxe is expected.
public  voidsetExpectedJavaScriptPrompt(String[] messages, String[] inputs)
     Tell that the given prompt boxes are expected in the given order.
public  voidsetFormElement(String formElementName, String value)
     Set the value of a form input element.
public  voidsetScriptingEnabled(boolean value)
    
public  voidsetTestContext(TestContext aTestContext)
     Allows setting an external test testContext class that might be extended from TestContext.
public  voidsetTestingEngineKey(String testingEngineKey)
     Set the Testing Engine that you want to use for the tests based on the Testing Engine Key.
public  voidsetTextField(String inputName, String value)
     Set the value of a text or password input field.
public  voidsetWorkingForm(int index)
     Begin interaction with a specified form.
public  voidsetWorkingForm(String nameOrId)
     Begin interaction with a specified form.
public  voidsetWorkingForm(String nameOrId, int index)
     Begin interaction with a specified form.
public  voidsubmit()
     Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on the form.
public  voidsubmit(String buttonName)
     Submit form by pressing named button.
public  voidsubmit(String buttonName, String buttonValue)
     Submit the form by pressing the named button with the given value (label).
public  voiduncheckCheckbox(String checkBoxName)
     Deselect a specified checkbox.
public  voiduncheckCheckbox(String checkBoxName, String value)
     Deselect a specified checkbox.



Method Detail
areFilesEqual
protected boolean areFilesEqual(URL f1, URL f2) throws IOException(Code)



assertButtonNotPresent
public void assertButtonNotPresent(String buttonId)(Code)
Assert that a button with a given id is not present in the current window.
Parameters:
  buttonId -



assertButtonNotPresentWithText
public void assertButtonNotPresentWithText(String text)(Code)
Assert that a button with a given text is not present in the current window.
Parameters:
  text - Text representation of button content.



assertButtonPresent
public void assertButtonPresent(String buttonId)(Code)
Assert that a button with a given id is present in the current window.
A button can be the following HTML elements:
  • button input
  • button button

Parameters:
  buttonId -



assertButtonPresentWithText
public void assertButtonPresentWithText(String text)(Code)
Assert that a button with a given text is present in the current window.
Parameters:
  text - Text representation of button content.



assertCheckboxNotPresent
public void assertCheckboxNotPresent(String checkboxName)(Code)
Assert that a form checkbox with a given name is not present.
Parameters:
  checkboxName - checkbox name.



assertCheckboxNotPresent
public void assertCheckboxNotPresent(String checkboxName, String checkboxValue)(Code)
Assert that a given checkbox is not present.
Parameters:
  checkboxName - checkbox name.
Parameters:
  checkboxValue - checkbox value attribut.



assertCheckboxNotSelected
public void assertCheckboxNotSelected(String checkBoxName)(Code)
Assert that a specific checkbox is not selected.
Parameters:
  checkBoxName -



assertCheckboxNotSelected
public void assertCheckboxNotSelected(String checkBoxName, String checkBoxValue)(Code)
Assert that a specific checkbox is not selected.
Parameters:
  checkBoxName -
Parameters:
  checkBoxValue -



assertCheckboxPresent
public void assertCheckboxPresent(String checkboxName)(Code)
Assert that a form checkbox with a given name is present.
Parameters:
  checkboxName - checkbox name.



assertCheckboxPresent
public void assertCheckboxPresent(String checkboxName, String checkboxValue)(Code)
Assert that a given checkbox is present.
Parameters:
  checkboxName - checkbox name attribut.
Parameters:
  checkboxValue - checkbox value attribut.



assertCheckboxSelected
public void assertCheckboxSelected(String checkBoxName)(Code)
Assert that a specific checkbox is selected.
Parameters:
  checkBoxName -



assertCheckboxSelected
public void assertCheckboxSelected(String checkBoxName, String checkBoxValue)(Code)
Assert that a specific checkbox is selected.
Parameters:
  checkBoxName -
Parameters:
  checkBoxValue -



assertCookiePresent
public void assertCookiePresent(String cookieName)(Code)
Checks to see if a cookie is present in the response.
Parameters:
  cookieName - The cookie name



assertCookieValueEquals
public void assertCookieValueEquals(String cookieName, String expectedValue)(Code)
Check to see if a cookie has the given value.
Parameters:
  cookieName - The cookie name
Parameters:
  expectedValue - The cookie value



assertCookieValueMatch
public void assertCookieValueMatch(String cookieName, String regexp)(Code)
Check to see if a cookie value match the given regexp.
Parameters:
  cookieName - The cookie name
Parameters:
  regexp - The regexp



assertDownloadedFileEquals
public void assertDownloadedFileEquals(URL expected)(Code)
Download the current page (or file) and compare it with the given file.
Parameters:
  expected - Expected file URL.



assertElementNotPresent
public void assertElementNotPresent(String anID)(Code)
Assert that an element with a given id is not present.
Parameters:
  anID - element id to test for.



assertElementNotPresentByXPath
public void assertElementNotPresentByXPath(String xpath)(Code)
Assert that an element with a given xpath is not present.
Parameters:
  xpath - element xpath to test for.



assertElementPresent
public void assertElementPresent(String anID)(Code)
Assert that an element with a given id is present.
Parameters:
  anID - element id to test for.



assertElementPresentByXPath
public void assertElementPresentByXPath(String xpath)(Code)
Assert that an element with a given xpath is present.
Parameters:
  xpath - element xpath to test for.



assertFormElementEmpty
public void assertFormElementEmpty(String formElementName)(Code)
Assert that a form element had no value / is empty.
Parameters:
  formElementName -



assertFormElementEquals
public void assertFormElementEquals(String formElementName, String expectedValue)(Code)
Assert that a specific form element has an expected value. Can be used to check hidden input.
Parameters:
  formElementName -
Parameters:
  expectedValue -



assertFormElementMatch
public void assertFormElementMatch(String formElementName, String regexp)(Code)
Assert that a specific form element matches an expected regexp.
Parameters:
  formElementName -
Parameters:
  regexp -



assertFormElementNotPresent
public void assertFormElementNotPresent(String formElementName)(Code)
Assert that a form input element with a given name is not present.
Parameters:
  formElementName -



assertFormElementPresent
public void assertFormElementPresent(String formElementName)(Code)
Assert that a form input element with a given name is present.
Parameters:
  formElementName -



assertFormNotPresent
public void assertFormNotPresent()(Code)
Assert that there is not a form present.



assertFormNotPresent
public void assertFormNotPresent(String nameOrID)(Code)
Assert that there is not a form with the specified name or id present.
Parameters:
  nameOrID -



assertFormPresent
public void assertFormPresent()(Code)
Assert that there is a form present.



assertFormPresent
public void assertFormPresent(String nameOrID)(Code)
Assert that there is a form with the specified name or id present.
Parameters:
  nameOrID -



assertFramePresent
public void assertFramePresent(String frameNameOrId)(Code)
Assert that a frame with the given name or ID is present.
Parameters:
  frameNameOrId - Name or ID of the frame. ID is checked first.



assertHiddenFieldPresent
public void assertHiddenFieldPresent(String formElementName, String expectedValue)(Code)
Assert that an input hidden element with name formElementName has the expectedValue value.
Parameters:
  formElementName - the value of the name attribute of the element
Parameters:
  expectedValue - the expected value of the given input element



assertImagePresent
public void assertImagePresent(String imageSrc, String imageAlt)(Code)



assertImageValid
public void assertImageValid(String imageSrc, String imageAlt)(Code)

See Also:   WebTester.assertImageValidAndStore(String,String,java.io.File)



assertImageValidAndStore
public void assertImageValidAndStore(String imageSrc, String imageAlt, File out)(Code)
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. relative to the current page.



assertKeyInTable
public void assertKeyInTable(String tableSummaryOrId, String key)(Code)
Assert that the value of a given web resource is present in a specific table.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  key - web resource name



assertKeyInTable
public void assertKeyInTable(String tableSummaryOrId, String key, Object[] args)(Code)
Assert that the value of a given web resource is present in a specific table.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  key - web resource name



assertKeyNotInTable
public void assertKeyNotInTable(String tableSummaryOrId, String key)(Code)
Assert that the value of a given web resource is not present in a specific table.
Parameters:
  tableSummaryOrId - summary, name or id attribute value of table
Parameters:
  key - web resource name



assertKeyNotPresent
public void assertKeyNotPresent(String key)(Code)
Assert that a web resource's value is not present.
Parameters:
  key - web resource name



assertKeyNotPresent
public void assertKeyNotPresent(String key, Object[] args)(Code)
Assert that a web resource's formatted value is not present.
Parameters:
  key - web resource name



assertKeyPresent
public void assertKeyPresent(String key)(Code)
Assert that a web resource's value is present.
Parameters:
  key - web resource name



assertKeyPresent
public void assertKeyPresent(String key, Object[] args)(Code)
Assert that a web resource's value (with formatting) is present
Parameters:
  key -
Parameters:
  args -



assertKeysInTable
public void assertKeysInTable(String tableSummaryOrId, String[] keys)(Code)
Assert that the values of a set of web resources are all present in a specific table.
Parameters:
  tableSummaryOrId - summary, name or id attribute value of table
Parameters:
  keys - Array of web resource names.



assertKeysInTable
public void assertKeysInTable(String tableSummaryOrId, String[] keys, Object[][] args)(Code)
Assert that the values of a set of web resources are all present in a specific table.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  keys - Array of web resource names.



assertLinkNotPresent
public void assertLinkNotPresent(String linkId)(Code)
Assert that no link with the given id is present in the response.
Parameters:
  linkId -



assertLinkNotPresentWithExactText
public void assertLinkNotPresentWithExactText(String linkText)(Code)
Assert that no link containing the Exact text is present.
Parameters:
  linkText -



assertLinkNotPresentWithExactText
public void assertLinkNotPresentWithExactText(String linkText, int index)(Code)
Assert that no link containing the Exact text is present.
Parameters:
  linkText -
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



assertLinkNotPresentWithImage
public void assertLinkNotPresentWithImage(String imageFileName)(Code)
Assert that a link containing a specified image is not present.
Parameters:
  imageFileName - A suffix of the image's filename; for example, to match "images/my_icon.png",you could just pass in "my_icon.png".



assertLinkNotPresentWithText
public void assertLinkNotPresentWithText(String linkText)(Code)
Assert that no link containing the supplied text is present.
Parameters:
  linkText -



assertLinkNotPresentWithText
public void assertLinkNotPresentWithText(String linkText, int index)(Code)
Assert that no link containing the supplied text is present.
Parameters:
  linkText -
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



assertLinkPresent
public void assertLinkPresent(String linkId)(Code)
Assert that a link with a given id is present in the response.
Parameters:
  linkId -



assertLinkPresentWithExactText
public void assertLinkPresentWithExactText(String linkText)(Code)
Assert that a link containing the Exact text is present.
Parameters:
  linkText -



assertLinkPresentWithExactText
public void assertLinkPresentWithExactText(String linkText, int index)(Code)
Assert that a link containing the Exact text is present.
Parameters:
  linkText -
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



assertLinkPresentWithImage
public void assertLinkPresentWithImage(String imageFileName)(Code)
Assert that a link containing a specified image is present.
Parameters:
  imageFileName - A suffix of the image's filename; for example, to match "images/my_icon.png",you could just pass in "my_icon.png".



assertLinkPresentWithText
public void assertLinkPresentWithText(String linkText)(Code)
Assert that a link containing the supplied text is present.
Parameters:
  linkText -



assertLinkPresentWithText
public void assertLinkPresentWithText(String linkText, int index)(Code)
Assert that a link containing the supplied text is present.
Parameters:
  linkText -
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



assertMatch
public void assertMatch(String regexp)(Code)
Assert that supplied regexp is matched.
Parameters:
  regexp -



assertMatchInElement
public void assertMatchInElement(String elementID, String regexp)(Code)
Assert that a given element matches a specific regexp.
Parameters:
  elementID - id of element to be inspected.
Parameters:
  regexp - to match.



assertMatchInTable
public void assertMatchInTable(String tableSummaryNameOrId, String regexp)(Code)
Assert that supplied regexp is matched in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  regexp -



assertMatchInTable
public void assertMatchInTable(String tableSummaryOrId, String[] regexp)(Code)
Assert that a set of regexp values are all matched in a specific table.
Parameters:
  tableSummaryOrId - summary, name or id attribute value of table
Parameters:
  text - Array of expected regexps to match.



assertNoMatch
public void assertNoMatch(String regexp)(Code)
Assert that supplied regexp is not present.
Parameters:
  regexp -



assertNoMatchInElement
public void assertNoMatchInElement(String elementID, String regexp)(Code)
Assert that a given element does not match a specific regexp.
Parameters:
  elementID - id of element to be inspected.
Parameters:
  regexp - to match.



assertNoMatchInTable
public void assertNoMatchInTable(String tableSummaryNameOrId, String regexp)(Code)
Assert that supplied regexp is not present in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  text -



assertNoMatchInTable
public void assertNoMatchInTable(String tableSummaryNameOrId, String[] regexp)(Code)
Assert that none of a set of regexp values are present in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  text - Array of text values



assertRadioOptionNotPresent
public void assertRadioOptionNotPresent(String name, String radioOption)(Code)
Assert that a specific option is not present in a radio group.
Parameters:
  name - radio group name.
Parameters:
  radioOption - option to test for.



assertRadioOptionNotSelected
public void assertRadioOptionNotSelected(String name, String radioOption)(Code)
Assert that a specific option is not selected in a radio group.
Parameters:
  name - radio group name.
Parameters:
  radioOption - option to test for selection.



assertRadioOptionPresent
public void assertRadioOptionPresent(String name, String radioOption)(Code)
Assert that a specific option is present in a radio group.
Parameters:
  name - radio group name.
Parameters:
  radioOption - option to test for.



assertRadioOptionSelected
public void assertRadioOptionSelected(String name, String radioOption)(Code)
Assert that a specific option is selected in a radio group.
Parameters:
  name - radio group name.
Parameters:
  radioOption - option to test for selection.



assertResetButtonNotPresent
public void assertResetButtonNotPresent()(Code)
Assert that no reset button is present in the current form.
A reset button can be the following HTML elements:
  • reset input
  • reset button

Parameters:
  buttonName -



assertResetButtonNotPresent
public void assertResetButtonNotPresent(String buttonName)(Code)
Assert that a reset button with a given name is not present.
A reset button can be the following HTML elements:
  • reset input
  • reset button

Parameters:
  buttonName -



assertResetButtonPresent
public void assertResetButtonPresent()(Code)
Assert that a reset button is present.
A reset button can be the following HTML elements:
  • reset input
  • reset button



assertResetButtonPresent
public void assertResetButtonPresent(String buttonName)(Code)
Assert that a reset button with a given name is present.
A reset button can be the following HTML elements:
  • reset input
  • reset button

Parameters:
  buttonName -



assertSelectOptionNotPresent
public void assertSelectOptionNotPresent(String selectName, String optionLabel)(Code)
Assert that a specific option is not present in a select box.
Parameters:
  selectName - name of the select element.
Parameters:
  expectedOption - option label.



assertSelectOptionPresent
public void assertSelectOptionPresent(String selectName, String optionLabel)(Code)
Assert that a specific option is present in a select box (by label).
Parameters:
  selectName - name of the select element.
Parameters:
  optionLabel - option label.



assertSelectOptionValueNotPresent
public void assertSelectOptionValueNotPresent(String selectName, String optionValue)(Code)



assertSelectOptionValuePresent
public void assertSelectOptionValuePresent(String selectName, String optionValue)(Code)
Assert that a specific option is present in a select box (by value).
Parameters:
  selectName - name of the select element.
Parameters:
  optionValue - option value.



assertSelectOptionValuesEqual
public void assertSelectOptionValuesEqual(String selectName, String[] expectedValues)(Code)
Assert that the values of a select element's options match a given array of strings.
Parameters:
  selectName - name of the select element.
Parameters:
  expectedValues - expected values for the select box.



assertSelectOptionValuesNotEqual
public void assertSelectOptionValuesNotEqual(String selectName, String[] optionValues)(Code)
Assert that the values of a select element's options do not match a given array of strings.
Parameters:
  selectName - name of the select element.
Parameters:
  optionValues - expected values for the select box.



assertSelectOptionValuesPresent
public void assertSelectOptionValuesPresent(String selectName, String[] optionValues)(Code)
Assert that given options are present in a select box (by value).
Parameters:
  selectName - name of the select element.
Parameters:
  optionValues - option labels.



assertSelectOptionsEqual
public void assertSelectOptionsEqual(String selectName, String[] expectedOptions)(Code)
Assert that the display values of a select element's options match a given array of strings.
Parameters:
  selectName - name of the select element.
Parameters:
  expectedOptions - expected labels for the select box.



assertSelectOptionsNotEqual
public void assertSelectOptionsNotEqual(String selectName, String[] expectedOptions)(Code)
Assert that the display values of a select element's options do not match a given array of strings.
Parameters:
  selectName - name of the select element.
Parameters:
  expectedOptions - expected display values for the select box.



assertSelectOptionsPresent
public void assertSelectOptionsPresent(String selectName, String[] optionLabels)(Code)
Assert that given options are present in a select box (by label).
Parameters:
  selectName - name of the select element.
Parameters:
  optionLabels - option labels.



assertSelectedOptionEquals
public void assertSelectedOptionEquals(String selectName, String option)(Code)



assertSelectedOptionMatches
public void assertSelectedOptionMatches(String selectName, String regexp)(Code)



assertSelectedOptionValueEquals
public void assertSelectedOptionValueEquals(String selectName, String value)(Code)
Assert that the currently selected value of a select box matches given value.
Parameters:
  selectName - name of the select element.
Parameters:
  value - expected value of the selected option.



assertSelectedOptionValuesEqual
public void assertSelectedOptionValuesEqual(String selectName, String[] values)(Code)
Assert that the currently selected value(s) of a select box matches given value(s).
Parameters:
  selectName - name of the select element.
Parameters:
  values - expected value(s) of the selected option.



assertSelectedOptionsEqual
public void assertSelectedOptionsEqual(String selectName, String[] labels)(Code)
Assert that the currently selected display label(s) of a select box matches given label(s).
Parameters:
  selectName - name of the select element.
Parameters:
  labels - expected display label(s) of the selected option.



assertSelectedOptionsMatch
public void assertSelectedOptionsMatch(String selectName, String[] regexps)(Code)
Assert that the currently selected display value(s) of a select box matches a given value(s).
Parameters:
  selectName - name of the select element.
Parameters:
  regexps - expected display value of the selected option.



assertSubmitButtonNotPresent
public void assertSubmitButtonNotPresent()(Code)
Assert that no submit button is present in the current form.
A submit button can be the following HTML elements:
  • submit input
  • image input
  • submit button

Parameters:
  buttonName -



assertSubmitButtonNotPresent
public void assertSubmitButtonNotPresent(String buttonName)(Code)
Assert that a submit button with a given name is not present.
A submit button can be the following HTML elements:
  • submit input
  • image input
  • submit button

Parameters:
  buttonName -



assertSubmitButtonPresent
public void assertSubmitButtonPresent()(Code)
Assert that a submit button is present.
A submit button can be the following HTML elements:
  • submit input
  • image input
  • submit button



assertSubmitButtonPresent
public void assertSubmitButtonPresent(String buttonName)(Code)
Assert that a submit button with a given name is present.
A submit button can be the following HTML elements:
  • submit input
  • image input
  • submit button

Parameters:
  buttonName -



assertSubmitButtonPresent
public void assertSubmitButtonPresent(String buttonName, String buttonValue)(Code)
Assert that a submit button with a given name and value is present.
A submit button can be the following HTML elements:
  • submit input
  • image input
  • submit button

Parameters:
  buttonName -
Parameters:
  buttonValue -



assertTableEquals
public void assertTableEquals(String tableSummaryNameOrId, Table expectedTable)(Code)
Assert that a specific table matches an ExpectedTable.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  expectedTable - represents expected values (colspan supported).



assertTableEquals
public void assertTableEquals(String tableSummaryNameOrId, String[][] expectedCellValues)(Code)
Assert that a specific table matches a matrix of supplied text values.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  expectedCellValues - double dimensional array of expected values



assertTableMatch
public void assertTableMatch(String tableSummaryOrId, Table expectedTable)(Code)
Assert that a specific table matches an ExpectedTable.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  expectedTable - represents expected regexps (colspan supported).



assertTableMatch
public void assertTableMatch(String tableSummaryOrId, String[][] expectedCellValues)(Code)
Assert that a specific table matches a matrix of supplied regexps.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  expectedCellValues - double dimensional array of expected regexps



assertTableNotPresent
public void assertTableNotPresent(String tableSummaryNameOrId)(Code)
Assert that a table with a given summary or id value is not present.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table



assertTablePresent
public void assertTablePresent(String tableSummaryNameOrId)(Code)
Assert that a table with a given summary or id value is present.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table



assertTableRowCountEquals
public void assertTableRowCountEquals(String tableSummaryNameOrId, int expectedRowCount)(Code)
Assert that the number of rows for a specific table equals expected value.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  expectedRowCount - expected row count.



assertTableRowsEqual
public void assertTableRowsEqual(String tableSummaryNameOrId, int startRow, Table expectedTable)(Code)
Assert that a range of rows for a specific table matches a matrix of supplied text values.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  startRow - index of start row for comparison
Parameters:
  expectedTable - represents expected values (colspan and rowspan supported).



assertTableRowsEqual
public void assertTableRowsEqual(String tableSummaryNameOrId, int startRow, String[][] expectedTable)(Code)
Assert that a range of rows for a specific table matches a matrix of supplied text values.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  startRow - index of start row for comparison
Parameters:
  expectedTable - represents expected values (colspan and rowspan supported).



assertTableRowsMatch
public void assertTableRowsMatch(String tableSummaryOrId, int startRow, Table expectedTable)(Code)
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  startRow - index of start row for comparison
Parameters:
  expectedTable - represents expected regexps (colspan and rowspan supported).



assertTableRowsMatch
public void assertTableRowsMatch(String tableSummaryOrId, int startRow, String[][] expectedTable)(Code)
Assert that a range of rows for a specific table matches a matrix of supplied regexps.
Parameters:
  tableSummaryOrId - summary or id attribute value of table
Parameters:
  startRow - index of start row for comparison
Parameters:
  expectedTable - represents expected regexps (colspan and rowspan not supported).



assertTextFieldEquals
public void assertTextFieldEquals(String formElementName, String expectedValue)(Code)
Assert that an input text element with name formElementName has the expectedValue value.
Parameters:
  formElementName - the value of the name attribute of the element
Parameters:
  expectedValue - the expected value of the given input element



assertTextInElement
public void assertTextInElement(String elementID, String text)(Code)
Assert that a given element contains specific text.
Parameters:
  elementID - id of element to be inspected.
Parameters:
  text - to check for.



assertTextInTable
public void assertTextInTable(String tableSummaryNameOrId, String text)(Code)
Assert that supplied text is present in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  text -



assertTextInTable
public void assertTextInTable(String tableSummaryOrId, String[] text)(Code)
Assert that a set of text values are all present in a specific table.
Parameters:
  tableSummaryOrId - summary, name or id attribute value of table
Parameters:
  text - Array of expected text values.



assertTextNotInElement
public void assertTextNotInElement(String elementID, String text)(Code)



assertTextNotInTable
public void assertTextNotInTable(String tableSummaryNameOrId, String text)(Code)
Assert that supplied text is not present in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  text -



assertTextNotInTable
public void assertTextNotInTable(String tableSummaryNameOrId, String[] text)(Code)
Assert that none of a set of text values are present in a specific table.
Parameters:
  tableSummaryNameOrId - summary, name or id attribute value of table
Parameters:
  text - Array of text values



assertTextNotPresent
public void assertTextNotPresent(String text)(Code)
Assert that supplied text is not present.
Parameters:
  text -



assertTextPresent
public void assertTextPresent(String text)(Code)
Assert that supplied text is present.
Parameters:
  text -



assertTitleEquals
public void assertTitleEquals(String title)(Code)
Assert title of current html page in conversation matches an expected value.
Parameters:
  title - expected title value



assertTitleEqualsKey
public void assertTitleEqualsKey(String titleKey)(Code)
Assert title of current html page matches the value of a specified web resource.
Parameters:
  titleKey - web resource key for title



assertTitleEqualsKey
public void assertTitleEqualsKey(String titleKey, Object[] args)(Code)
Assert title of current page matches formatted message resource
Parameters:
  titleKey -
Parameters:
  args -



assertTitleMatch
public void assertTitleMatch(String regexp)(Code)
Assert title of current html page in conversation matches an expected regexp.
Parameters:
  regexp - expected title regexp



assertWindowCountEquals
public void assertWindowCountEquals(int windowCount)(Code)
Assert that the number of opened windows equals given value.
Parameters:
  windowCount - Window count



assertWindowPresent
public void assertWindowPresent(String windowName)(Code)
Assert that a window with the given name is open.
Parameters:
  windowName -



assertWindowPresent
public void assertWindowPresent(int windowID)(Code)
Assert that a window with the given ID is open.
Parameters:
  windowID - Javascript window ID.



assertWindowPresentWithTitle
public void assertWindowPresentWithTitle(String title)(Code)
Assert that at least one window with the given title is open.
Parameters:
  title -



beginAt
public void beginAt(String aRelativeURL) throws TestingEngineResponseException(Code)
Begin conversation at a URL absolute or relative to base URL. Use TestContext.setBaseUrl(String) getTestContext().setBaseUrl(String) to define base URL. Absolute URL should start with "http://", "https://" or "www.".
Parameters:
  url - absolute or relative URL (relative to base URL).
throws:
  TestingEngineResponseException - If something bad happend (404)



checkCheckbox
public void checkCheckbox(String checkBoxName)(Code)
Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked.
Parameters:
  checkBoxName - name of checkbox to be selected.



checkCheckbox
public void checkCheckbox(String checkBoxName, String value)(Code)
Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked.
Parameters:
  checkBoxName - name of checkbox to be selected.
Parameters:
  value - value of checkbox to be selected.



clickButton
public void clickButton(String buttonId)(Code)
Click the button with the given id.
Parameters:
  buttonId - Button ID attribut value.



clickButtonWithText
public void clickButtonWithText(String buttonValueText)(Code)
Clicks a button with text of the value attribute.
Parameters:
  buttonValueText - The text of the button (contents of the value attribute).



clickElementByXPath
public void clickElementByXPath(String xpath)(Code)
Click element with given xpath.
Parameters:
  xpath - xpath of the element.



clickLink
public void clickLink(String linkId)(Code)
Navigate by selection of a link with given id.
Parameters:
  linkId - id of link



clickLinkWithExactText
public void clickLinkWithExactText(String linkText)(Code)
Navigate by selection of a link with the exact given text.
Parameters:
  linkText - Text of the link.



clickLinkWithExactText
public void clickLinkWithExactText(String linkText, int index)(Code)
Navigate by selecting Nth link with the exact given text.
Parameters:
  linkText - Text of the link.
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



clickLinkWithImage
public void clickLinkWithImage(String imageFileName)(Code)
Navigate by selection of a link with a given image.
Parameters:
  imageFileName - A suffix of the image's filename; for example, to match "images/my_icon.png",you could just pass in "my_icon.png".



clickLinkWithText
public void clickLinkWithText(String linkText)(Code)
Navigate by selection of a link containing given text.
Parameters:
  linkText - Text in the link.



clickLinkWithText
public void clickLinkWithText(String linkText, int index)(Code)
Navigate by selecting Nth link containing given text.
Parameters:
  linkText - Text in the link.
Parameters:
  index - The 0-based index, when more than one link with the same text is expected.



clickRadioOption
public void clickRadioOption(String radioGroup, String radioOption)(Code)
Clicks a radio option. Asserts that the radio option exists first. *
Parameters:
  radioGroup - name of the radio group.
Parameters:
  radioOption - value of the option to check for.



closeBrowser
public void closeBrowser()(Code)
Close the current conversation.



closeWindow
public void closeWindow()(Code)
Close the current window.



dumpCookies
public void dumpCookies()(Code)
Print all the cookies to stdout.



dumpHtml
public void dumpHtml()(Code)
Dump html of current response to System.out - for debugging purposes.
Parameters:
  stream - WebTester.getPageSource



dumpHtml
public void dumpHtml(PrintStream stream)(Code)
Dump html of current response to a specified stream - for debugging purposes.
Parameters:
  stream - WebTester.getPageSource



dumpTable
public void dumpTable(String tableNameOrId)(Code)
Dump the table as the 2D array that is used for assertions - for debugging purposes.
Parameters:
  tableNameOrId -
Parameters:
  stream -



dumpTable
public void dumpTable(String tableNameOrId, PrintStream stream)(Code)
Dump the table as the 2D array that is used for assertions - for debugging purposes.
Parameters:
  tableNameOrId -
Parameters:
  table -
Parameters:
  stream -



getDialog
public IJWebUnitDialog getDialog()(Code)
Provides access to the testing engine for subclasses - in case functionality not yet wrappered required by test. If the dialog is not explicitly set the jWebUnit framework will default to using the orignal testing engine, which is, htmlunit. IJWebUnitDialog instance used to wrapper htmlunit conversation.



getElementAttributByXPath
public String getElementAttributByXPath(String xpath, String attribut)(Code)
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"
Parameters:
  xpath - XPath of the element.
Parameters:
  attribut - Name of the attribut. The value of the attribut.



getElementTextByXPath
public String getElementTextByXPath(String xpath)(Code)
Get text of the given element.
Parameters:
  xpath - xpath of the element.



getFormElementValue
public String getFormElementValue(String formElementName)(Code)



getImage
public Image getImage(String imageSrc, String imageAlt)(Code)

See Also:   WebTester.assertImageValidAndStore(String,String,java.io.File)



getMessage
public String getMessage(String key)(Code)
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.
Parameters:
  key - name of the web resource. value of the web resource, encoded according to TestContext.



getMessage
public String getMessage(String key, Object[] args)(Code)
Return the value of a web resource based on its key, using MessageFormat to perform parametric substitution with formatting.
See Also:   MessageFormat
Parameters:
  key - name of the web resource.
Parameters:
  args - array of arguments to be formatted into message value of the web resource after formatting



getPageSource
public String getPageSource()(Code)
Get the source of the HTML page (like in a real browser), or HTTP body for a non HTML content. The HTML content.



getServeurResponse
public String getServeurResponse()(Code)
Get the last data sent by the server. HTTP server response.



getTable
public Table getTable(String tableSummaryNameOrId)(Code)

Parameters:
  tableSummaryNameOrId - Object that represent a html table in a way independent from plugin.



getTestContext
public TestContext getTestContext()(Code)
Provide access to test testContext. TestContext



getTestingEngine
protected IJWebUnitDialog getTestingEngine()(Code)
Protected version of deprecated getDialog(). Not deprecated for internal use. IJWebUnitDialog instance.



getTestingEngineKey
public String getTestingEngineKey()(Code)
Gets the Testing Engine Key that is used to find the proper testing engine class (HtmlUnitDialog / SeleniumDialog) for the tests. Returns the testingEngineKey.



gotoFrame
public void gotoFrame(String frameNameOrId)(Code)
Make the given frame active.
Parameters:
  frameNameOrId - Name or ID of the frame. ID is checked first.



gotoPage
public void gotoPage(String url) throws TestingEngineResponseException(Code)
Go to the given page like if user has typed the URL manually in the browser. Use TestContext.setBaseUrl(String) getTestContext().setBaseUrl(String) to define base URL. Absolute URL should start with "http://", "https://" or "www.".
Parameters:
  url - absolute or relative URL (relative to base URL).
throws:
  TestingEngineResponseException - If something bad happend (404)



gotoRootWindow
public void gotoRootWindow()(Code)
Make the root window active.



gotoWindow
public void gotoWindow(String windowName)(Code)
Make a given window active.
Parameters:
  windowName - Name of the window.



gotoWindow
public void gotoWindow(int windowID)(Code)
Make a given window active.
Parameters:
  windowID - Javascript ID of the window



gotoWindowByTitle
public void gotoWindowByTitle(String title)(Code)
Make first window with the given title active.
Parameters:
  title - Title of the window.



initializeDialog
protected IJWebUnitDialog initializeDialog()(Code)
Initializes the IJWebUnitDialog when the dialog is null. This will construct a new instance of the dialog based on the specified testing engine key.



reset
public void reset()(Code)
Reset the current form using the default reset button. See WebTester.getForm for an explanation of how the current form is established.



saveAs
public void saveAs(File f)(Code)
Save the last downloaded page (or file) to the disk.
Parameters:
  f - The file name.



selectOption
public void selectOption(String selectName, String label)(Code)
Select an option with a given display label in a select element.
Parameters:
  selectName - name of select element.
Parameters:
  label - label of option to be selected.



selectOptionByValue
public void selectOptionByValue(String selectName, String value)(Code)
Select an option with a given value in a select element.
Parameters:
  selectName - name of select element.
Parameters:
  values - values of options to be selected.



selectOptions
public void selectOptions(String selectName, String[] labels)(Code)
Select options with given display labels in a select element.
Parameters:
  selectName - name of select element.
Parameters:
  labels - labels of options to be selected.



selectOptionsByValues
public void selectOptionsByValues(String selectName, String[] values)(Code)
Select options with given values in a select element.
Parameters:
  selectName - name of select element.
Parameters:
  values - values of options to be selected.



setDialog
public void setDialog(IJWebUnitDialog aIJWebUnitDialog)(Code)
Set the testing engine.
Parameters:
  aIJWebUnitDialog - Testing engine.



setExpectedJavaScriptAlert
public void setExpectedJavaScriptAlert(String message)(Code)
Tell that the given alert boxe is expected.
Parameters:
  message - Message in the alert.



setExpectedJavaScriptAlert
public void setExpectedJavaScriptAlert(String[] messages)(Code)
Tell that the given alert boxes are expected in the given order.
Parameters:
  messages - Messages in the alerts.



setExpectedJavaScriptConfirm
public void setExpectedJavaScriptConfirm(String message, boolean action)(Code)
Tell that the given confirm boxe is expected.
Parameters:
  message - Message in the confirm.
Parameters:
  action - Whether we should click on "OK" (true) or "Cancel" (false)



setExpectedJavaScriptConfirm
public void setExpectedJavaScriptConfirm(String[] messages, boolean[] actions)(Code)
Tell that the given confirm boxes are expected in the given order.
Parameters:
  messages - Messages in the confirms.
Parameters:
  actions - Whether we should click on "OK" (true) or "Cancel" (false)



setExpectedJavaScriptPrompt
public void setExpectedJavaScriptPrompt(String message, String input)(Code)
Tell that the given prompt boxe is expected.
Parameters:
  message - Message in the prompt.
Parameters:
  input - What we should put in the prompt (null if user press Cancel)



setExpectedJavaScriptPrompt
public void setExpectedJavaScriptPrompt(String[] messages, String[] inputs)(Code)
Tell that the given prompt boxes are expected in the given order.
Parameters:
  messages - Messages in the prompts.
Parameters:
  inputs - What we should put in the prompt (null if user press Cancel)



setFormElement
public void setFormElement(String formElementName, String value)(Code)
Set the value of a form input element.
Parameters:
  formElementName - name of form element.
Parameters:
  value -



setScriptingEnabled
public void setScriptingEnabled(boolean value)(Code)
Enable or disable Javascript support



setTestContext
public void setTestContext(TestContext aTestContext)(Code)
Allows setting an external test testContext class that might be extended from TestContext. Example: setTestContext(new CompanyATestContext()); CompanyATestContext extends TestContext.
Parameters:
  aTestContext -



setTestingEngineKey
public void setTestingEngineKey(String testingEngineKey)(Code)
Set the Testing Engine that you want to use for the tests based on the Testing Engine Key.
See Also:   TestingEngineRegistry
Parameters:
  testingEngineKey - The testingEngineKey to set.



setTextField
public void setTextField(String inputName, String value)(Code)
Set the value of a text or password input field.
Parameters:
  inputName - name of form element.
Parameters:
  value - value to set.



setWorkingForm
public void setWorkingForm(int index)(Code)
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.
Parameters:
  index - 0-based index of the form to work with.



setWorkingForm
public void setWorkingForm(String nameOrId)(Code)
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.
Parameters:
  nameOrId - name or id of the form to work with.



setWorkingForm
public void setWorkingForm(String nameOrId, int index)(Code)
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.
Parameters:
  nameOrId - name or id of the form to work with.
Parameters:
  index - The 0-based index, when more than one form with the same name is expected.



submit
public void submit()(Code)
Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on the form.



submit
public void submit(String buttonName)(Code)
Submit form by pressing named button.
Parameters:
  buttonName - Submit button name attribut value.



submit
public void submit(String buttonName, String buttonValue)(Code)
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.
Parameters:
  buttonName - Submit button name attribut value.
Parameters:
  buttonValue - Submit button value attribut value.



uncheckCheckbox
public void uncheckCheckbox(String checkBoxName)(Code)
Deselect a specified checkbox. If the checkbox is already unchecked then the checkbox will stay unchecked.
Parameters:
  checkBoxName - name of checkbox to be deselected.



uncheckCheckbox
public void uncheckCheckbox(String checkBoxName, String value)(Code)
Deselect a specified checkbox. If the checkbox is already unchecked then the checkbox will stay unchecked.
Parameters:
  checkBoxName - name of checkbox to be deselected.
Parameters:
  value - value of checkbox to be deselected.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.