Java Doc for JWebUnitWebBrowser.java in  » Testing » DDSteps » org » ddsteps » web » jwebunit » 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 » DDSteps » org.ddsteps.web.jwebunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.ddsteps.web.jwebunit.JWebUnitWebBrowser

All known Subclasses:   org.ddsteps.jwebunit.WebBrowser,
JWebUnitWebBrowser
public class JWebUnitWebBrowser extends WebTester implements WebBrowser(Code)
Extends the WebTester to provide easy-of-use config properties, and a nice HTML trail functionality.
author:
   adam
version:
   $Id$


Field Summary
final public static  Loglogger
    
protected  WebTrailwebTrail
     Dependency / delegate: WebTrail that is used to write trail.

Constructor Summary
public  JWebUnitWebBrowser()
     No-args.

Method Summary
public  voidassertButtonDisabled(String buttonId)
     Assert that a button is present and disabled.
public  voidassertButtonEnabled(String buttonId)
     Assert that a button is present and enabled.
public  voidassertFormElementNotPresentOrDisabled(String formElementName)
     Assert that a form element is not present or disabled.
public  voidassertFormElementPresentAndEnabled(String formElementName)
     Assert that a form element is present and enabled.
public  voidassertOptionIsSelectedByValue(String selectId, String selectedValue)
    
public  voidassertOptionValuePresent(String selectId, String value)
    
public  voidassertOptionsEqual(String selectName, String[] expectedOptions)
    
public  voidassertTextInElement(String elementId, String[] texts)
     If the list has any non blanks strings, the element must exist and have all the non blank strings in it.
public  voidendTrail()
    
public  ButtongetButton(String buttonId)
    
public  StringgetDefaultOption(String selectName)
     Gets the LABEL of the selected option in a select box.
public  String[]getOptionValues(String selectId)
     Get all the option values for a select tag.
Parameters:
  selectId - The ID of the select tag.
public  StringgetSelectedOptionValue(String selectName)
     Gets the LABEL of the selected option in a select box.
Parameters:
  selectName - The NAME of the select tag.
public  FilegetTrailFolder()
    
public  booleanisTrailEnabled()
    
public  voidselectOptionByValue(String selectId, String value)
     Select an option using the value, not the key.
public  voidsetFormElement(String formElementName, String[] values)
     Overload to enable setting multiple form elements with the same name.
public  voidsetTrailEnabled(boolean trailEnabled)
    
public  voidsetTrailFolder(File trailFolder)
    
public  voidsetUrl(String url)
    
public  voidsetWorkingFormByFieldName(String fieldName)
     Finds the form with the specified field in, and sets that form as the working form.
public  voidsetWorkingFormByFieldNameAndValue(String fieldName, String value)
     Finds the form with the specified field in with a specific value, and sets that form as the working form.
public  voidstartTrail(String trailName)
    
public  voidsubmit(String buttonName, String value)
     Push a submit button based on the name and value of it.
protected  WebClientupdateDialog()
    
public  voidwritePage(String filename)
     Write the current page to a file, regardless of any current trail or if trailing is enabled or not.
public  voidwriteTrail(String pageName)
    

Field Detail
logger
final public static Log logger(Code)
Logger for this class



webTrail
protected WebTrail webTrail(Code)
Dependency / delegate: WebTrail that is used to write trail.




Constructor Detail
JWebUnitWebBrowser
public JWebUnitWebBrowser()(Code)
No-args. There will be no trail by default.




Method Detail
assertButtonDisabled
public void assertButtonDisabled(String buttonId)(Code)
Assert that a button is present and disabled.
Parameters:
  buttonId -



assertButtonEnabled
public void assertButtonEnabled(String buttonId)(Code)
Assert that a button is present and enabled.
Parameters:
  buttonId -



assertFormElementNotPresentOrDisabled
public void assertFormElementNotPresentOrDisabled(String formElementName)(Code)
Assert that a form element is not present or disabled.
Parameters:
  formElementName - name of the form element



assertFormElementPresentAndEnabled
public void assertFormElementPresentAndEnabled(String formElementName)(Code)
Assert that a form element is present and enabled.
Parameters:
  formElementName - name of the form element



assertOptionIsSelectedByValue
public void assertOptionIsSelectedByValue(String selectId, String selectedValue)(Code)

Parameters:
  selectId - The select tag.
Parameters:
  selectedValue - The VALUE that should be selected.



assertOptionValuePresent
public void assertOptionValuePresent(String selectId, String value)(Code)

Parameters:
  selectId -
Parameters:
  value -



assertOptionsEqual
public void assertOptionsEqual(String selectName, String[] expectedOptions)(Code)

See Also:   org.ddsteps.web.WebBrowser.assertOptionsEqual(java.lang.Stringjava.lang.String[])



assertTextInElement
public void assertTextInElement(String elementId, String[] texts)(Code)
If the list has any non blanks strings, the element must exist and have all the non blank strings in it.
Parameters:
  elementId -
Parameters:
  texts -



endTrail
public void endTrail()(Code)

See Also:   org.ddsteps.web.WebBrowser.endTrail



getButton
public Button getButton(String buttonId)(Code)
Gets a button by id and asserts that is was found
Parameters:
  buttonId - The button, never null.



getDefaultOption
public String getDefaultOption(String selectName)(Code)
Gets the LABEL of the selected option in a select box.
Parameters:
  selectName - The label



getOptionValues
public String[] getOptionValues(String selectId)(Code)
Get all the option values for a select tag.
Parameters:
  selectId - The ID of the select tag. Array of options.



getSelectedOptionValue
public String getSelectedOptionValue(String selectName)(Code)
Gets the LABEL of the selected option in a select box.
Parameters:
  selectName - The NAME of the select tag. The label



getTrailFolder
public File getTrailFolder()(Code)

See Also:   org.ddsteps.web.WebBrowser.getTrailFolder



isTrailEnabled
public boolean isTrailEnabled()(Code)

See Also:   org.ddsteps.web.WebBrowser.isTrailEnabled



selectOptionByValue
public void selectOptionByValue(String selectId, String value)(Code)
Select an option using the value, not the key.
Parameters:
  selectId - The id of the select tag.
Parameters:
  value - The value



setFormElement
public void setFormElement(String formElementName, String[] values)(Code)
Overload to enable setting multiple form elements with the same name.
Parameters:
  formElementName - name of the form element
Parameters:
  values - the values to set



setTrailEnabled
public void setTrailEnabled(boolean trailEnabled)(Code)

See Also:   org.ddsteps.web.WebBrowser.setTrailEnabled(boolean)



setTrailFolder
public void setTrailFolder(File trailFolder)(Code)

See Also:   org.ddsteps.web.WebBrowser.setTrailFolder(java.io.File)



setUrl
public void setUrl(String url)(Code)

See Also:   org.ddsteps.web.WebBrowser.setUrl(java.lang.String)



setWorkingFormByFieldName
public void setWorkingFormByFieldName(String fieldName)(Code)
Finds the form with the specified field in, and sets that form as the working form. The form does not need to have a name or id.

This method does use a bit of evil reflection magic to force itself on HttpUnit, so you really should concider adding a name or id to your form.

Fails if there are more than one form with that parameter.
Parameters:
  fieldName - The field name




setWorkingFormByFieldNameAndValue
public void setWorkingFormByFieldNameAndValue(String fieldName, String value)(Code)
Finds the form with the specified field in with a specific value, and sets that form as the working form. The form does not need to have a name or id. Very useful for choosing between many different forms that differ only by the value of a hidden field.

This method does use a bit of evil reflection magic to force itself on HttpUnit, so you really should concider adding a name or id to your form.

It will use the FIRST form it finds with the requested combo.
Parameters:
  fieldName - The field name
Parameters:
  value - The field value




startTrail
public void startTrail(String trailName)(Code)

See Also:   org.ddsteps.web.WebBrowser.startTrail(java.lang.String)



submit
public void submit(String buttonName, String value)(Code)
Push a submit button based on the name and value of it.
Parameters:
  buttonName -
Parameters:
  value -



updateDialog
protected WebClient updateDialog()(Code)



writePage
public void writePage(String filename)(Code)
Write the current page to a file, regardless of any current trail or if trailing is enabled or not.

If you want a full trail of everything the test sees, use the trail functionalit instead.
Parameters:
  filename - Relative filename in the trail folder, or a full file name.




writeTrail
public void writeTrail(String pageName)(Code)

See Also:   org.ddsteps.web.WebBrowser.writeTrail(java.lang.String)



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