net.sf.jameleon.plugin.jiffie.tags
Class IESetSelectFieldTag
java.lang.Object
org.apache.commons.jelly.TagSupport
net.sf.jameleon.LocationAwareTagSupport
net.sf.jameleon.JameleonTagSupport
net.sf.jameleon.function.FunctionTag
net.sf.jameleon.plugin.jiffie.IEFunctionTag
net.sf.jameleon.plugin.jiffie.tags.IEFireEventTag
net.sf.jameleon.plugin.jiffie.tags.IESetSelectFieldTag
All Implemented Interfaces: BreakPoint , Attributable , DocumentDelegate , Storable , DynaTag , LocationAware , Tag
public class IESetSelectFieldTag extends IEFireEventTag
Sets the value(s) of any select field.
Only one of optionText, optionValue, or optionIndex can set. In other words, they
can't be used in conjunction with one another.
Some example uses might be:
Selecting
<select name="selectField">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>
<ie-set-select-field functionId="Set the select field not in a form to the value displayed as 'two'"
name="selectField"
optionText="two"/>
Selecting multiple values from:
<select name="selectField" mulitple>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>
<map-variable toVariable="fieldValues" variableType="List">
<variable-value>1</variable-value>
<variable-value>4</variable-value>
</map-variable>
<ie-set-select-field functionId="Set mulitple values in the the select field via the value '1' and '4'"
name="selectField"
optionValue="${fieldValues}"/>
<ie-set-select-field functionId="Set the select field to the value displayed as 'two'"
name="selectField"
optionText="two"
form="testForm"/>
<ie-set-select-field functionId="Set the select field to the value '3' as defined by its value attribute"
name="selectField"
optionValue="3"
form="testForm"/>
<ie-set-select-field functionId="Set the select field to the fourth selection"
name="selectField"
optionIndex="3"
form="testForm"/>
NOTE: This tag does not currently support the xpath attribute nor the nested ie-attribute tags.
Author:
Christian Hargraves, Pravin Bhujbal
Tag Name : <ie-set-select-field> Type : action
Steps:
Find the given form and set it as the working form
Find the given select field and set it's value
Field Summary
protected String
form
The name, id or index of the field
protected String
name
The name of the text field
protected List
optionIndex
The index of the option to select.
protected List
optionText
The displayed text of the option to select.
protected List
optionValue
The value attribute of the option tag to select.
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
Methods inherited from class net.sf.jameleon.plugin.jiffie.IEFunctionTag
activateBrowserWithIndex , activateBrowserWithTitle , activateLastNewWindow , assertCheckboxChecked , assertCheckboxChecked , assertCheckboxChecked , assertCheckboxChecked , assertCheckboxWithNameAndValueChecked , assertCheckboxWithNameAndValueChecked , assertCheckboxWithNameAndValueChecked , assertCheckboxWithNameAndValueChecked , assertLinkPresent , assertLinkPresent , assertLinkPresent , assertLinkPresent , assertLinkWithHrefPresent , assertLinkWithHrefPresent , assertPasswordFieldValueEquals , assertPasswordFieldValueEquals , assertPasswordFieldValueEquals , assertPasswordFieldValueEquals , assertRadioButtonChecked , assertRadioButtonChecked , assertRadioButtonChecked , assertRadioButtonChecked , assertSelectFieldOptionIndexEquals , assertSelectFieldOptionIndexEquals , assertSelectFieldOptionIndexEquals , assertSelectFieldOptionIndexEquals , assertSelectFieldOptionIndexesEqual , assertSelectFieldOptionIndexesEqual , assertSelectFieldOptionIndexesEqual , assertSelectFieldOptionIndexesEqual , assertSelectFieldOptionTextEquals , assertSelectFieldOptionTextEquals , assertSelectFieldOptionTextEquals , assertSelectFieldOptionTextEquals , assertSelectFieldOptionTextValuesEqual , assertSelectFieldOptionTextValuesEqual , assertSelectFieldOptionTextValuesEqual , assertSelectFieldOptionTextValuesEqual , assertSelectFieldOptionValueEquals , assertSelectFieldOptionValueEquals , assertSelectFieldOptionValueEquals , assertSelectFieldOptionValueEquals , assertSelectFieldOptionValuesEqual , assertSelectFieldOptionValuesEqual , assertSelectFieldOptionValuesEqual , assertSelectFieldOptionValuesEqual , assertTextAreaValueEquals , assertTextAreaValueEquals , assertTextAreaValueEquals , assertTextAreaValueEquals , assertTextFieldValueEquals , assertTextFieldValueEquals , assertTextFieldValueEquals , assertTextFieldValueEquals , assertTextNotPresent , assertTextNotPresent , assertTextNotPresent , assertTextNotPresent , assertTextPresent , assertTextPresent , assertTextPresent , assertTextPresent , assertTextPresent , assertTitleEquals , assertTitleEquals , assertTitleEquals , assertTitleEquals , assertTitleEquals , assertTitleEquals , assertTitleEquals , assertTitleNotEquals , assertTitleNotEquals , assertTitleNotEquals , assertTitleNotEquals , assertXPath , assertXPathResultsSizeEquals , assertXPathResultsSizeEquals , clearSelectFieldValues , clickIHTMLElement , clickImageLinkWithAltText , clickLink , clickLink , clickLink , clickLinkWithHref , clickLinkWithId , clickLinkWithImageSrc , clickLinkWithText , clickSubmitButtonWithName , closeBrowserWindow , closeBrowserWindow , fireEvent , getAreaElementByAltText , getByXPath , getCheckbox , getCheckboxWithNameAndValue , getDocument , getElementByXPath , getElementsByXPath , getForm , getFormWithId , getFormWithIndex , getFormWithName , getFormWithXPath , getFrameWithId , getFrameWithName , getFrameWithSrc , getHiddenField , getHTMLSource , getIHTMLElement , getIHTMLElement , getIHTMLElement , getIHTMLElement , getIHTMLElements , getIHTMLElements , getIHTMLElements , getIHTMLElements , getImageLinkWithAltText , getInputFieldByName , getLink , getLinksWith , getLinkWith , getLinkWithHref , getLinkWithID , getLinkWithImageSrc , getLinkWithName , getPasswordField , getRadioButton , getSelectedOptionField , getSelectField , getSubmit , getSubmit , getSubmitButtonWithName , getSubmitButtonWithNameAndValue , getSubmitButtonWithValue , getTextArea , getTextField , getWorkingForm , highlightActiveElement , isTextInPage , navigate , navigate , pluginTearDown , setCheckbox , setCheckboxWithNameAndValue , setHiddenFieldValue , setPasswordFieldValue , setRadioButtonValue , setSelectFieldOptionIndex , setSelectFieldOptionIndexes , setSelectFieldOptionText , setSelectFieldOptionTextValues , setSelectFieldOptionValue , setSelectFieldOptionValues , setTextAreaValue , setTextFieldValue , setTextFieldValue , setupEnvironment , setWorkingForm , setWorkingForm , setWorkingFormById , setWorkingFormByIndex , setWorkingFormByName , store , submitWorkingForm
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 , 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 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
name
protected String name
The name of the text field
This attribute is recognized by Jameleon Required: true
Context Name: ieSetSelectFieldName
optionText
protected List optionText
The displayed text of the option to select.
This attribute can have multiple values. In which case each one will be validated.
This attribute is recognized by Jameleon Context Name: ieSetSelectFieldOptionText
optionValue
protected List optionValue
The value attribute of the option tag to select.
This attribute can have multiple values. In which case each one will be validated.
NOTE: This is not the text that appears in the drop-down list.
Instead it is the value attribute of the option tag which should be
nested inside the select tag.
This attribute is recognized by Jameleon Context Name: ieSetSelectFieldOptionValue
optionIndex
protected List optionIndex
The index of the option to select. For example, to select the 2nd option, pass in 1
This attribute can have multiple values. In which case each one will be validated.
This attribute is recognized by Jameleon Context Name: ieSetSelectFieldOptionIndex
form
protected String form
The name, id or index of the field
This attribute is recognized by Jameleon Context Name: ieSetSelectFieldForm
IESetSelectFieldTag
public IESetSelectFieldTag ()
testBlock
public void testBlock ()
Overrides: testBlock in class IEFireEventTag
Copyright © 2004-2008 Christian Hargraves. All Rights Reserved.