Java Doc for AbstractSetFieldStep.java in  » Testing » webtest » com » canoo » webtest » steps » form » 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 » webtest » com.canoo.webtest.steps.form 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.canoo.webtest.steps.Step
   com.canoo.webtest.steps.AbstractBrowserAction
      com.canoo.webtest.steps.form.AbstractSetFieldStep

All known Subclasses:   com.canoo.webtest.steps.form.AbstractSetNamedFieldStep,  com.canoo.webtest.steps.form.SetFileField,
AbstractSetFieldStep
abstract public class AbstractSetFieldStep extends AbstractBrowserAction (Code)
Abstract class for steps which update form fields. This class handles the attributes name/formName, htmlId or xpath.
author:
   Marc Guillemot
author:
   Paul King
author:
   Denis N. Antonioli


Field Summary
final public static  StringMESSAGE_ARGUMENT_MISSING
    
final public static  StringMESSAGE_ARGUMENT_REDUNDANT
    


Method Summary
public  voiddoExecute()
    
 HtmlElementfindFieldByLabel(HtmlPage page, String labelText)
    
protected  ListfindFields(HtmlForm form)
     Finds all possible input fields.
abstract protected  HtmlFormfindForm()
     Finds the relevant form.
public  StringgetFieldIndex()
    
public  StringgetForLabel()
    
public  StringgetFormName()
    
public  StringgetHtmlId()
    
public  StringgetName()
    
public  StringgetXpath()
    
protected  booleankeepField(HtmlElement elt)
     Called by AbstractSetFieldStep.findFields(com.gargoylesoftware.htmlunit.html.HtmlForm) to filter out elements with the correct name but not matching some other selection criteria.
Parameters:
  elt - One of the elements with the correct name.
public static  HtmlElementselectField(List fieldList, String indexStr, Step step)
     Finds the desired field by selecting either a specific field designated by indexStr or the first one if indexStr is left blank
Parameters:
  fieldList - A list of HtmlElement fields.
Parameters:
  indexStr - The index of the desired field.
Parameters:
  step - The calling step, for exception.
abstract protected  voidsetField(HtmlElement field)
     Sets a field according to the step.
public  voidsetFieldIndex(String index)
     Set the index.
public  voidsetForLabel(String text)
     Set the text of the label associated with the field to set.
public  voidsetFormName(String formName)
     Set the form name.
public  voidsetHtmlId(String htmlId)
     Set the html id.
public  voidsetName(String name)
     Set the name.
public  voidsetXpath(String xpath)
     Set the xpath.
protected  ListtrimFields(List fields)
     Apply AbstractSetFieldStep.keepField(com.gargoylesoftware.htmlunit.html.HtmlElement) to trim the list of fields found.
Parameters:
  fields - All fields found.
protected  voidverifyParameters()
    

Field Detail
MESSAGE_ARGUMENT_MISSING
final public static String MESSAGE_ARGUMENT_MISSING(Code)



MESSAGE_ARGUMENT_REDUNDANT
final public static String MESSAGE_ARGUMENT_REDUNDANT(Code)





Method Detail
doExecute
public void doExecute() throws SAXException, IOException(Code)



findFieldByLabel
HtmlElement findFieldByLabel(HtmlPage page, String labelText)(Code)
Retrieves the (first) field associated with the label containing the provided text
Parameters:
  page - the page to search in
Parameters:
  labelText - the text of the label the associated form field
throws:
  StepFailedException - if no field is found



findFields
protected List findFields(HtmlForm form)(Code)
Finds all possible input fields. This is a generic implementation, sub-classes may want to take advantage of more specific functions.
Parameters:
  form - The form to search. A list of candidate fields.



findForm
abstract protected HtmlForm findForm()(Code)
Finds the relevant form. The found form.



getFieldIndex
public String getFieldIndex()(Code)



getForLabel
public String getForLabel()(Code)



getFormName
public String getFormName()(Code)



getHtmlId
public String getHtmlId()(Code)



getName
public String getName()(Code)



getXpath
public String getXpath()(Code)



keepField
protected boolean keepField(HtmlElement elt)(Code)
Called by AbstractSetFieldStep.findFields(com.gargoylesoftware.htmlunit.html.HtmlForm) to filter out elements with the correct name but not matching some other selection criteria.
Parameters:
  elt - One of the elements with the correct name. True if the element is accepted.



selectField
public static HtmlElement selectField(List fieldList, String indexStr, Step step)(Code)
Finds the desired field by selecting either a specific field designated by indexStr or the first one if indexStr is left blank
Parameters:
  fieldList - A list of HtmlElement fields.
Parameters:
  indexStr - The index of the desired field.
Parameters:
  step - The calling step, for exception. The selected field



setField
abstract protected void setField(HtmlElement field) throws IOException(Code)
Sets a field according to the step. It is up to the step's implementation to decide how to set the step.
Parameters:
  field - The field to set.



setFieldIndex
public void setFieldIndex(String index)(Code)
Set the index.
Parameters:
  index -



setForLabel
public void setForLabel(String text)(Code)
Set the text of the label associated with the field to set.
Parameters:
  text - the label text



setFormName
public void setFormName(String formName)(Code)
Set the form name.
Parameters:
  formName -



setHtmlId
public void setHtmlId(String htmlId)(Code)
Set the html id.
Parameters:
  htmlId -



setName
public void setName(String name)(Code)
Set the name.
Parameters:
  name -



setXpath
public void setXpath(String xpath)(Code)
Set the xpath.
Parameters:
  xpath -



trimFields
protected List trimFields(List fields)(Code)
Apply AbstractSetFieldStep.keepField(com.gargoylesoftware.htmlunit.html.HtmlElement) to trim the list of fields found.
Parameters:
  fields - All fields found. A list of candidate fields.



verifyParameters
protected void verifyParameters()(Code)



Methods inherited from com.canoo.webtest.steps.AbstractBrowserAction
public void setSave(String prefix)(Code)(Java Doc)
public void setSavePrefix(String prefix)(Code)(Java Doc)
public void setSaveResponse(String response)(Code)(Java Doc)

Fields inherited from com.canoo.webtest.steps.Step
final public static String DEFAULT_DESCRIPTION(Code)(Java Doc)
final public static String ELEMENT_ATTRIBUTE_ID(Code)(Java Doc)
final public static String ELEMENT_ATTRIBUTE_NAME(Code)(Java Doc)
final public static String PROPERTY_TYPE_ANT(Code)(Java Doc)
final public static String PROPERTY_TYPE_ANT_STRICT(Code)(Java Doc)
final public static String PROPERTY_TYPE_DEFAULT(Code)(Java Doc)
final public static String PROPERTY_TYPE_DYNAMIC(Code)(Java Doc)

Methods inherited from com.canoo.webtest.steps.Step
protected void addComputedParameters(Map map)(Code)(Java Doc)
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
abstract public void doExecute() throws Exception(Code)(Java Doc)
protected void emptyParamCheck(String param, String paramName)(Code)(Java Doc)
public void execute()(Code)(Java Doc)
protected Map getComputedParameters()(Code)(Java Doc)
public Context getContext()(Code)(Java Doc)
protected String getDefaultPropertyType()(Code)(Java Doc)
public String getDescription(String prefix, String suffix)(Code)(Java Doc)
public long getDuration()(Code)(Java Doc)
public Map getParameterDictionary()(Code)(Java Doc)
protected String getStepLabel()(Code)(Java Doc)
protected static IStringVerifier getVerifier(boolean useRegex)(Code)(Java Doc)
public Map getWebtestProperties()(Code)(Java Doc)
public Map getWebtestProperties(String propertyType)(Code)(Java Doc)
public String getWebtestProperty(String name)(Code)(Java Doc)
public String getWebtestProperty(String name, String propertyType)(Code)(Java Doc)
protected void handleException(Throwable t)(Code)(Java Doc)
public boolean hasDescription()(Code)(Java Doc)
protected void integerParamCheck(String param, String paramName, boolean nonNegative)(Code)(Java Doc)
public boolean isCompleted()(Code)(Java Doc)
public boolean isStarted()(Code)(Java Doc)
public boolean isSuccessful()(Code)(Java Doc)
public void notifyCompleted()(Code)(Java Doc)
public void notifyStarted()(Code)(Java Doc)
protected void notifyStepResultsListeners()(Code)(Java Doc)
public void notifySuccess()(Code)(Java Doc)
protected void nullParamCheck(Object param, String paramName)(Code)(Java Doc)
protected void nullResponseCheck()(Code)(Java Doc)
protected void optionalIntegerParamCheck(String param, String paramName, boolean nonNegative)(Code)(Java Doc)
protected void paramCheck(boolean condition, String message)(Code)(Java Doc)
protected void positiveOrZeroParamCheck(int value, String paramName)(Code)(Java Doc)
public void setStepid(String description)(Code)(Java Doc)
public void setWebtestProperty(String name, String value)(Code)(Java Doc)
public void setWebtestProperty(String name, String value, String propertyType)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
protected void verifyParameters()(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.