net.sf.jameleon.plugin.htmlunit.tags
Class HtmlUnitSetPasswordFieldTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.LocationAwareTagSupport
          extended by net.sf.jameleon.JameleonTagSupport
              extended by net.sf.jameleon.function.FunctionTag
                  extended by net.sf.jameleon.plugin.htmlunit.HtmlUnitFunctionTag
                      extended by net.sf.jameleon.plugin.htmlunit.tags.AbstractHtmlUnitSetFormFieldTag
                          extended by net.sf.jameleon.plugin.htmlunit.tags.AbstractHtmlUnitSetInputFieldTag
                              extended by net.sf.jameleon.plugin.htmlunit.tags.HtmlUnitSetPasswordFieldTag
All Implemented Interfaces:
BreakPoint, Attributable, Storable, DynaTag, LocationAware, Tag

public class HtmlUnitSetPasswordFieldTag
extends AbstractHtmlUnitSetInputFieldTag

A tag which sets a password field to the provided value.
To use XPath to set a text field named testPasswordField that exists in a form with the name testform:


     <htmlunit-set-password-field
            functionId="Set the testTextField field to 'some value'"
            xpath="//form[@name='testform]/input[@name='testPasswordField']"
            value="some value"/>
 
To use XPath to set a password field named testPasswordField that doesn't exist in a form:

     <htmlunit-set-password-field
            functionId="Set the testTextField field to 'some value'"
            xpath="//input[@name='testPasswordField']"
            value="some value"/>
 
To to set a password field named testPasswordField that exists in a form with id or name of form_test w/o using XPath:

     <htmlunit-set-password-field
            functionId="Set the testTextField field to 'some value'"
            form="form_test"
            fieldName="testPasswordField"
            value="some value"/>
 
To to set a password field named testPasswordField that exists in the 2nd form form_test w/o using XPath:

     <htmlunit-set-password-field
            functionId="Set the testTextField field to 'some value'"
            form="2"
            fieldName="testPasswordField"
            value="some value"/>
 
To to set a password field named testPasswordField that exists in form define by //table/tr[3]/td/form XPath:

     <htmlunit-set-password-field
            functionId="Set the testTextField field to 'some value'"
            form="//table/tr[3]/td/form"
            fieldName="testPasswordField"
            value="some value"/>
 

Tag Name: <htmlunit-set-password-field> Type: action

Field Summary
 
Fields inherited from class net.sf.jameleon.plugin.htmlunit.tags.AbstractHtmlUnitSetFormFieldTag
fieldName, form, value, xpath
 
Fields inherited from class net.sf.jameleon.plugin.htmlunit.HtmlUnitFunctionTag
helper, sessionTag, workingForm
 
Fields inherited from class net.sf.jameleon.function.FunctionTag
addt, breakPoint, expectException, expectFailure, fResults, functionDelay, functionId, lastFileWritten, log, NO_DELAY, params, postcondition, precondition, st, state, tct, vpt
 
Fields inherited from class net.sf.jameleon.JameleonTagSupport
attributes, broker, contextVars, fp, unsupportedAttributes
 
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport
columnNumber, elementTagName, lineNumber, scriptFileName
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
HtmlUnitSetPasswordFieldTag()
           
 
Method Summary
protected  String getInputType()
           
protected  void setFieldValueInForm()
           
 
Methods inherited from class net.sf.jameleon.plugin.htmlunit.tags.AbstractHtmlUnitSetInputFieldTag
setFieldValueFoundByXPath, setInputFieldFoundByXPath
 
Methods inherited from class net.sf.jameleon.plugin.htmlunit.tags.AbstractHtmlUnitSetFormFieldTag
getSubmitableElementByXPath, testBlock
 
Methods inherited from class net.sf.jameleon.plugin.htmlunit.HtmlUnitFunctionTag
assertTextPresent, assertTextPresent, assertTextPresent, assertTextPresent, assertTitleEquals, assertTitleEquals, assertTitleEquals, assertTitleEquals, assertXPathMatches, assertXPathMatches, assertXPathMatches, assertXPathMatches, clickElementWithXPath, getHtmlElementByAttributeNameAndValue, getHtmlElementByXPath, getHtmlForm, getHtmlFormById, getHtmlFormByIndex, getHtmlFormByName, getHtmlFormByXPath, getWorkingForm, navigate, setCheckBox, setCheckBox, setFileField, setHiddenField, setHtmlInputValue, setHtmlInputValueByXPath, setPasswordField, setRadioButton, setSelectFieldByIndex, setSelectFieldByOptionText, setSelectFieldByValue, setSelectFieldByXPath, setTextArea, setTextField, setupEnvironment, setWorkingForm, setWorkingFormById, setWorkingFormByIndex, setWorkingFormByName, setWorkingFormByXPath, store
 
Methods inherited from class net.sf.jameleon.function.FunctionTag
addParam, addRequiredAttribute, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertFalse, assertFalse, assertMethod, assertMethodWithLevel, assertNotNull, assertNotNull, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNotSame, assertNotSame, assertNull, assertNull, assertNull, assertNull, assertRegexMatches, assertRegexMatches, assertRegexMatches, assertRegexMatches, assertSame, assertSame, assertSame, assertSame, assertTextContains, assertTextContains, assertTextContains, assertTextContains, assertTextEndsWith, assertTextEndsWith, assertTextEndsWith, assertTextEndsWith, assertTextStartsWith, assertTextStartsWith, assertTextStartsWith, assertTextStartsWith, assertTrue, assertTrue, assertTrue, assertTrue, checkParamTypes, cleanUp, cleanUpEnvironment, delay, delay, doTag, fail, fail, fail, fail, getFunctionId, getFunctionResults, getMatchingRegexText, getParam, getParamLength, getParams, getParentTags, getSessionTag, getStoreToFileName, getStringOrDefault, getTestCaseTag, getVariable, getVariableAsBoolean, getVariableAsList, getVariableAsString, isBreakPoint, isContextVariableNull, pluginTearDown, recordFunctionResult, regexMatches, removeFunctionResult, removeVariable, setDefaultVariableValue, setDefaultVariableValue, setExpectException, setExpectFailure, setFunctionDelay, setFunctionId, setup, setUpFunctionResults, setVariable, tearDown, traceMsg, validate
 
Methods inherited from class net.sf.jameleon.JameleonTagSupport
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught
 
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent
 

Constructor Detail

HtmlUnitSetPasswordFieldTag

public HtmlUnitSetPasswordFieldTag()
Method Detail

getInputType

protected String getInputType()
Specified by:
getInputType in class AbstractHtmlUnitSetInputFieldTag

setFieldValueInForm

protected void setFieldValueInForm()
Specified by:
setFieldValueInForm in class AbstractHtmlUnitSetFormFieldTag


Copyright © 2006-2008 Christian Hargraves. All Rights Reserved.