net.sf.jameleon.plugin.jiffie
Class IEFunctionTag

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.jiffie.IEFunctionTag
All Implemented Interfaces:
BreakPoint, Attributable, DocumentDelegate, Storable, DynaTag, LocationAware, Tag
Direct Known Subclasses:
IEClickLinkTag, IECloseWindowTag, IEExecuteJavaScriptTag, IEFireEventTag, IEGetMatchingTextTag, IEGoBackTag, IEGoForwardTag, IEIsTextPresentTag, IENavigateTag, IESendKeysTag, IESetHiddenFieldTag, IESetWindowFocusTag, IESnapShotTag, IEValidateCheckboxTag, IEValidatePasswordFieldTag, IEValidateRadiobuttonTag, IEValidateSelectFieldTag, IEValidateTextAreaTag, IEValidateTextFieldTag, IEValidateTextTag, IEValidateTitleTag, IEValidateXPathTag, IEValidationTag

public abstract class IEFunctionTag
extends FunctionTag
implements DocumentDelegate

This is the base FunctionTag for the Jiffie Plug-in. To create a custom functional point for the Jiffie Plug-in, simply create a class that extends this class. To make it functional, simply implement the FunctionTag.testBlock method.


Nested Class Summary
 class IEFunctionTag.TagRunnable
           
 
Field Summary
protected  IHTMLElementFinder elementFinder
          Used for some helper methods to find elements.
protected  String frameId
          The id attribute of the frame or iframe to act upon.
protected  String frameName
          The name attribute of the frame or iframe to act upon.
protected  String frameSrc
          The src attribute of the frame or iframe to act upon.
protected  boolean highlightActiveElement
          Whether or not to highlight the currently active HTML element.
protected  InternetExplorer ie
          The reference to the current instance of the Internet Explorer.
protected  IESessionTag session
          The session within which the function tag is running
protected  boolean visible
          Defines whether the InternetExplorer windows shall be visible or not
protected  boolean WAIT
          Whether or not to wait for a response.
protected  IHTMLFormElement workingForm
          The current form to do submits and value setting
 
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
IEFunctionTag()
           
 
Method Summary
 void activateBrowserWithIndex(int browserIndex)
          Activates the browser that was opened the nth time.
 void activateBrowserWithTitle(String title)
          Activates the browser with the provided title.
 void activateLastNewWindow()
          If a new window has been opened by a tag and within the same tag you want to access that popup, you've to use this method to get it.
 void assertCheckboxChecked(String checkBoxName, boolean checked)
          Checks that a checkbox in the workingForm is checked or unchecked.
 void assertCheckboxChecked(String checkBoxName, boolean checked, int assertLevel)
          Checks that a checkbox in the workingForm is checked or unchecked.
 void assertCheckboxChecked(String msg, String checkBoxName, boolean checked)
          Checks that a checkbox in the workingForm is checked or unchecked.
 void assertCheckboxChecked(String msg, String checkBoxName, boolean checked, int assertLevel)
          Checks that a checkbox in the workingForm is checked or unchecked.
 void assertCheckboxWithNameAndValueChecked(String checkBoxName, String checkBoxValue, boolean checked)
          Checks that a checkbox with a given name and value in the workingForm is checked or unchecked.
 void assertCheckboxWithNameAndValueChecked(String checkBoxName, String checkBoxValue, boolean checked, int assertLevel)
          Checks that a checkbox with a given name and value in the workingForm is checked or unchecked.
 void assertCheckboxWithNameAndValueChecked(String msg, String checkBoxName, String checkBoxValue, boolean checked)
          Checks that a checkbox with a given name and value in the workingForm is checked or unchecked.
 void assertCheckboxWithNameAndValueChecked(String msg, String checkBoxName, String checkBoxValue, boolean checked, int assertLevel)
          Checks that a checkbox with a given name and value in the workingForm is checked or unchecked.
 void assertLinkPresent(String linkText)
          Checks that a link with given text is present in the current html.
 void assertLinkPresent(String linkText, int assertLevel)
          Checks that a link with given text is present in the current html.
 void assertLinkPresent(String msg, String linkText)
          Checks that a link with given text is present in the current html.
 void assertLinkPresent(String msg, String linkText, int assertLevel)
          Checks that a link with given text is present in the current html.
 IHTMLAnchorElement assertLinkWithHrefPresent(String href, String linkText)
           
 IHTMLAnchorElement assertLinkWithHrefPresent(String msg, String linkText, String href, int assertLevel)
          Checks that a link with given text is present in the current html.
 void assertPasswordFieldValueEquals(String fieldName, String value)
          Checks the value of the password field.
 void assertPasswordFieldValueEquals(String fieldName, String value, int assertLevel)
          Checks the value of the password field.
 void assertPasswordFieldValueEquals(String msg, String fieldName, String value)
          Checks the value of the password field.
 void assertPasswordFieldValueEquals(String msg, String fieldName, String value, int assertLevel)
          Checks the value of the password field.
 void assertRadioButtonChecked(String fieldName, String value)
          Checks that the given radio button has the provided value selected
 void assertRadioButtonChecked(String fieldName, String value, int assertLevel)
          Checks that the given radio button has the provided value selected
 void assertRadioButtonChecked(String msg, String fieldName, String value)
          Checks that the given radio button has the provided value selected If the test fails display the given msg
 void assertRadioButtonChecked(String msg, String fieldName, String value, int assertLevel)
          Checks that the given radio button has the provided value selected If the test fails display the given msg
 void assertSelectFieldOptionIndexEquals(String fieldName, int index)
          Checks that the given select field has the provided index selected
 void assertSelectFieldOptionIndexEquals(String fieldName, int index, int assertLevel)
          Checks that the given select field has the provided index selected
 void assertSelectFieldOptionIndexEquals(String msg, String fieldName, int index)
          Checks that the given select field has the provided index selected If the test fails display the given msg
 void assertSelectFieldOptionIndexEquals(String msg, String fieldName, int index, int assertLevel)
          Checks that the given select field has the provided index selected If the test fails display the given msg
 void assertSelectFieldOptionIndexesEqual(String fieldName, int[] indexes)
          Checks that the given select field has the provided indexes selected
 void assertSelectFieldOptionIndexesEqual(String fieldName, int[] indexes, int assertLevel)
          Checks that the given select field has the provided indexes selected
 void assertSelectFieldOptionIndexesEqual(String msg, String fieldName, int[] indexes)
          Checks that the given select field has the provided index selected If the test fails display the given msg
 void assertSelectFieldOptionIndexesEqual(String msg, String fieldName, int[] indexes, int assertLevel)
          Checks that the given select field has the provided index selected If the test fails display the given msg
 void assertSelectFieldOptionTextEquals(String fieldName, String textValue)
          Checks that the given select field has the provided displayed text value selected
 void assertSelectFieldOptionTextEquals(String fieldName, String textValue, int assertLevel)
          Checks that the given select field has the provided displayed text value selected
 void assertSelectFieldOptionTextEquals(String msg, String fieldName, String textValue)
          Checks that the given select field has the provided displayed text value selected If the test fails display the given msg
 void assertSelectFieldOptionTextEquals(String msg, String fieldName, String textValue, int assertLevel)
          Checks that the given select field has the provided displayed text value selected If the test fails display the given msg
 void assertSelectFieldOptionTextValuesEqual(String fieldName, List textValues)
          Checks that the given select field has the provided displayed text values selected
 void assertSelectFieldOptionTextValuesEqual(String fieldName, List textValues, int assertLevel)
          Checks that the given select field has the provided displayed text values selected
 void assertSelectFieldOptionTextValuesEqual(String msg, String fieldName, List textValues)
          Checks that the given select field has the provided displayed text values selected If the test fails display the given msg
 void assertSelectFieldOptionTextValuesEqual(String msg, String fieldName, List textValues, int assertLevel)
          Checks that the given select field has the provided displayed text values selected If the test fails display the given msg
 void assertSelectFieldOptionValueEquals(String fieldName, String value)
          Checks that the given select field has the provided value selected
 void assertSelectFieldOptionValueEquals(String fieldName, String value, int assertLevel)
          Checks that the given select field has the provided value selected
 void assertSelectFieldOptionValueEquals(String msg, String fieldName, String value)
          Checks that the given select field has the provided value selected If the test fails display the given msg
 void assertSelectFieldOptionValueEquals(String msg, String fieldName, String value, int assertLevel)
          Checks that the given select field has the provided value selected If the test fails display the given msg
 void assertSelectFieldOptionValuesEqual(String fieldName, List values)
          Checks that the given select field has the provided values selected
 void assertSelectFieldOptionValuesEqual(String fieldName, List values, int assertLevel)
          Checks that the given select field has the provided values selected
 void assertSelectFieldOptionValuesEqual(String msg, String fieldName, List values)
          Checks that the given select field has the provided values selected If the test fails display the given msg
 void assertSelectFieldOptionValuesEqual(String msg, String fieldName, List values, int assertLevel)
          Checks that the given select field has the provided values selected If the test fails display the given msg
 void assertTextAreaValueEquals(String fieldName, String value)
          Checks the value of the text area.
 void assertTextAreaValueEquals(String fieldName, String value, int assertLevel)
          Checks the value of the text area.
 void assertTextAreaValueEquals(String msg, String fieldName, String value)
          Checks the value of the text area.
 void assertTextAreaValueEquals(String msg, String fieldName, String value, int assertLevel)
          Checks the value of the text area.
 void assertTextFieldValueEquals(String fieldName, String value)
          Checks the value of the text field.
 void assertTextFieldValueEquals(String fieldName, String value, int assertLevel)
          Checks the value of the text field.
 void assertTextFieldValueEquals(String msg, String fieldName, String value)
          Checks the value of the text field.
 void assertTextFieldValueEquals(String msg, String fieldName, String value, int assertLevel)
          Checks the value of the text field.
 void assertTextNotPresent(String text)
          Asserts that the supplied text is not present in the reponse.
 void assertTextNotPresent(String text, int assertLevel)
          Asserts that the supplied text is not present in the reponse.
 void assertTextNotPresent(String msg, String text)
          Asserts that the supplied text is not present in the reponse.
 void assertTextNotPresent(String msg, String text, int assertLevel)
          Asserts that the supplied text is not present in the reponse.
 void assertTextPresent(String text)
          Asserts that supplied text is present.
 void assertTextPresent(String text, boolean regex)
          Asserts that supplied text is present and if regex is set to true, then text is a Perl5 style regular expression (evaluated using jakarta ORO package).
 void assertTextPresent(String text, int assertLevel)
          Asserts that supplied text is present.
 void assertTextPresent(String msg, String text)
          Asserts that supplied text is present.
 void assertTextPresent(String msg, String text, int assertLevel)
          Asserts that supplied text is present.
 void assertTitleEquals(String title)
          Checks that the title of the current html page matches the expected value, title Leading and trailing whitespace is not to be included in the compare.
 void assertTitleEquals(String title, boolean trimWhitespace)
          Checks that the title of the current html page matches the expected value, title
 void assertTitleEquals(String title, int assertLevel, boolean trimWhitespace)
          Checks that the title of the current html page matches the expected value, title
 void assertTitleEquals(String msg, String title)
          Checks that the title of the current html page matches the expected value, title Leading and trailing whitespace is not to be included in the compare.
 void assertTitleEquals(String msg, String title, boolean trimWhitespace)
          Checks that the title of the current html page matches the expected value, title If the test fails display the given message
 void assertTitleEquals(String msg, String title, int assertLevel)
          Checks that the title of the current html page matches the expected value, title If the test fails display the given message
 void assertTitleEquals(String msg, String title, int assertLevel, boolean trimWhitespace)
          Checks that the title of the current html page matches the expected value, title If the test fails display the given message
 void assertTitleNotEquals(String title)
          Checks that the title of the current html page does not matche the expected value, title
 void assertTitleNotEquals(String title, int assertLevel)
          Checks that the title of the current html page does not matche the expected value, title
 void assertTitleNotEquals(String msg, String title)
          Checks that the title of the current html page does not matche the expected value, title If the test fails display the given message
 void assertTitleNotEquals(String msg, String title, int assertLevel)
          Checks that the title of the current html page does not matche the expected value, title If the test fails display the given message
 void assertXPath(String xpath2evaluate)
          Validates that a given XPATH returns at least one result
 void assertXPathResultsSizeEquals(String xpath2evaluate, int numOfResults)
          Validates that a given XPATH returns a provided number of results
 void assertXPathResultsSizeEquals(String msg, String xpath2evaluate, int numOfResults)
          Validates that a given XPATH returns a provided number of results
 void clearSelectFieldValues(IHTMLSelectElement selectField)
          Clears the currently selected options of the provided select field
 void clickIHTMLElement(IHTMLElement element)
          Clicks on an IHTMLElement by using the jiffie provided BlockingClickThread.
 void clickImageLinkWithAltText(String altText)
          Navigate by selection of a link with a given alt text.
 void clickLink(IHTMLAnchorElement anchor, boolean ignoreTarget)
           
 void clickLink(String link)
          Finds a link via the getLink(java.lang.String) method and clicks on it.
 void clickLink(String link, boolean ignoreTarget)
          Finds a link via the getLink(java.lang.String) method and clicks on it.
 void clickLinkWithHref(String href, String link)
          Finds a link via the getLinkWithHref(java.lang.String, java.lang.String) method and clicks on it.
 void clickLinkWithId(String linkId)
          Navigate by selection of a link with given id.
 void clickLinkWithImageSrc(String src)
          Navigate by selection of a link with a given src.
 void clickLinkWithText(String linkText)
          Navigate by selection of a link containing the given text.
 void clickSubmitButtonWithName(String submitButtonName)
          Clicks on the submit button in the current working form with the provided name
 void closeBrowserWindow()
          Closes the current Internet Explorer window by sending a quit event to it.
 void closeBrowserWindow(long timeInMillis)
          Closes the current Internet Explorer window by sending a quit event to it.
 void fireEvent(IHTMLElement element, String eventToFire)
          Fires a an event against the provided HTML element
 IHTMLElement getAreaElementByAltText(String altText)
          Gets the area HTML tag with the given alt text
 IHTMLDOMNode getByXPath(String xpath2evaluate)
          This method returns the IHTMLDOMNode identified by the given xpath.
 IHTMLInputElement getCheckbox(String checkboxFieldName)
          Gets the checkbox given by it's field name
 IHTMLInputElement getCheckboxWithNameAndValue(String name, String value)
          Gets the checkbox given by it's field name and value
 IHTMLDocument2 getDocument()
           
 IHTMLElement getElementByXPath(String xpath2evaluate)
           
 List getElementsByXPath(String xpath2evaluate)
           
 IHTMLFormElement getForm(String formInfo)
          Tries to get a form via the following methods in order.
 IHTMLFormElement getFormWithId(String id)
          Tries to get a form with the id attribute provided
 IHTMLFormElement getFormWithIndex(int index)
          Tries to get the nth form on the page.
 IHTMLFormElement getFormWithName(String name)
          Tries to get a form with the name attribute provided
 IHTMLFormElement getFormWithXPath(String xpath)
           
 IHTMLFrameBase2 getFrameWithId(String frameId)
          Gets a frame by the id attribute
 IHTMLFrameBase2 getFrameWithName(String frameName)
          Gets a frame by the name attribute
 IHTMLFrameBase2 getFrameWithSrc(String frameSrc)
          Gets a frame by the src attribute
 IHTMLInputElement getHiddenField(String fieldName)
          Gets the hidden field by the name provided
 String getHTMLSource()
          Gets the HTML source from the current page.
 IHTMLElement getIHTMLElement(ElementContainer container, String htmlTag, String[] attributeNames, String[] attributeValues)
          Gets the first matching IHTMLElement with the given html tag, attributes and attribute values
 IHTMLElement getIHTMLElement(ElementContainer container, String htmlTag, String attributeName, String attributeValue)
          Gets the first matching IHTMLElement with the given html tag, attribute and attribute value
 IHTMLElement getIHTMLElement(String htmlTag, String[] attributeNames, String[] attributeValues)
          Gets the first matching IHTMLElement with the given html tag, attributes and attribute values
 IHTMLElement getIHTMLElement(String htmlTag, String attributeName, String attributeValue)
          Gets the first matching IHTMLElement with the given html tag, attribute and attribute value
 List getIHTMLElements(ElementContainer container, String htmlTag, String[] attributeNames, String[] attributeValues)
          Gets a List of matching IHTMLElements with the given html tag, attributes and attribute values
 List getIHTMLElements(ElementContainer container, String htmlTag, String attributeName, String attributeValue)
          Gets a List of matching IHTMLElements with the given html tag, attribute and attribute value
 List getIHTMLElements(String htmlTag, String[] attributeNames, String[] attributeValues)
          Gets a List of matching IHTMLElements with the given html tag, attributes and attribute values
 List getIHTMLElements(String htmlTag, String attributeName, String attributeValue)
          Gets a List of matching IHTMLElements with the given html tag, attribute and attribute value
 IHTMLAnchorElement getImageLinkWithAltText(String text)
          Helper method to find a link with given img alt text
 IHTMLInputElement getInputFieldByName(String inputFieldName)
          Gets an input field by name.
 IHTMLAnchorElement getLink(String text)
          Tries to get a link via the following methods in order.
 List getLinksWith(String text)
          Helper method to find all links with the contained text
 IHTMLAnchorElement getLinkWith(String text)
          Helper method to find a link with contained text
 IHTMLAnchorElement getLinkWithHref(String href, String text)
          Helper method to find a link with the given regex contained in the href attribute.
 IHTMLAnchorElement getLinkWithID(String id)
          Helper method to find a link with given id
 IHTMLAnchorElement getLinkWithImageSrc(String src)
          Helper method to find a link with given img src attribute
 IHTMLAnchorElement getLinkWithName(String name)
          Helper method to find a link with given name
 IHTMLInputElement getPasswordField(String passwordFieldName)
          Gets the text field given by it's field name
 IHTMLInputElement getRadioButton(String radioButtonName, String value)
          Gets the radio button with the specified name and value
 IHTMLOptionElement getSelectedOptionField(String selectFieldName)
          Gets the currently selected option from the given select field defined by selectFieldName
 IHTMLSelectElement getSelectField(String selectFieldName)
          Gets the select field defined by selectFieldName
 IHTMLInputElement getSubmit(String name)
          Tries to get a submit element in the following order.
 IHTMLInputElement getSubmit(String type, String value)
          Gets the submit button identified by it's value (the label shown in the browser).
 IHTMLInputElement getSubmitButtonWithName(String buttonName)
          Gets the first submit button by it's name from the working form
 IHTMLInputElement getSubmitButtonWithNameAndValue(String buttonName, String value)
          Gets the first submit button by it's name and value from the working form
 IHTMLInputElement getSubmitButtonWithValue(String value)
          Gets the first submit button by it's value from the working form
 IHTMLTextAreaElement getTextArea(String fieldName)
          Gets the text area given by it's field name
 IHTMLInputElement getTextField(String fieldName)
          Gets the text field given by it's field name
 IHTMLFormElement getWorkingForm()
          Gets the current working form used to set form values and submit
 boolean highlightActiveElement()
           
 boolean isTextInPage(String text)
          Checks to see if the current page has the desired block of text
 void navigate(String url)
          Navigates directly to the given URL
 void navigate(String url, String username, String password)
          Navigates directly to the given URL todo add handling of basic authentication.
 void pluginTearDown()
           
 IHTMLInputElement setCheckbox(String checkboxFieldName, boolean checked)
          Sets the checkbox to checked or unchecked.
 IHTMLInputElement setCheckboxWithNameAndValue(String checkboxFieldName, String checkboxValue, boolean checked)
          Sets the checkbox to checked or unchecked given a name and value.
 IHTMLInputElement setHiddenFieldValue(String hiddenFieldName, String value)
          Sets the given hidden field (input type=hidden named hiddenFieldName to the value desired, value
 IHTMLInputElement setPasswordFieldValue(String passwordFieldName, String value)
          Sets the given password field, passwordFieldName to the value desired, value
 IHTMLInputElement setRadioButtonValue(String radioButtonName, String value)
          Sets the value of a radio button
 IHTMLSelectElement setSelectFieldOptionIndex(String selectFieldName, int index)
          Sets the index of a select or drop down.
 IHTMLSelectElement setSelectFieldOptionIndexes(String selectFieldName, int[] indexes)
          Sets the indexes of a select or drop down.
 IHTMLSelectElement setSelectFieldOptionText(String selectFieldName, String displayedText)
          Sets the value of a select or drop down to the value with the displayed text.
 IHTMLSelectElement setSelectFieldOptionTextValues(String selectFieldName, List displayedTextValues)
          Sets the values of a select or drop down to the values with the displayed text.
 IHTMLSelectElement setSelectFieldOptionValue(String selectFieldName, String value)
          Sets the value of a select or drop down.
 IHTMLSelectElement setSelectFieldOptionValues(String selectFieldName, List values)
          Sets the values of a select or drop down.
 IHTMLTextAreaElement setTextAreaValue(String textAreaName, String value)
          Sets the given text area named textFieldName to the value desired, value
 IHTMLInputElement setTextFieldValue(String textFieldName, String value)
          Sets the given text field (input type=text named textFieldName to the value desired, value This method follows the maxlength HTML attribute, by truncating the value to the maxlength before setting the value.
 IHTMLInputElement setTextFieldValue(String textFieldName, String value, boolean enforceMaxLength)
          Sets the given text field (input type=text named textFieldName to the value desired, value This method follows the maxlength HTML attribute, by truncating the value to the maxlength before setting the value.
 void setupEnvironment()
          Gets the references of the session and the test results from the parent TestCase This method gets called once all attributes are set from the macro language.
 void setWorkingForm(IHTMLFormElement form)
          Sets the working form to the provided IHTMLFormElement
 void setWorkingForm(String formIdNameOrIndex)
          Sets the working form, using the following methods in order.
 void setWorkingFormById(String id)
          Sets the working form by the id of the form
 void setWorkingFormByIndex(int index)
          Sets the working form by the order it is in the actual HTML.
 void setWorkingFormByName(String name)
          Sets the working form by the name of the form
 void store(String fName, int event)
           
 void submitWorkingForm()
          Submits the current working form
 
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, testBlock, 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
 

Field Detail

WAIT

protected boolean WAIT
Whether or not to wait for a response. Use this attribute if you need to click on something that brings up a prompt window. Just remember that this setting is for the entire duration of the tag. Which means if you click on a link and then try to validate something within the same tag, then it will likely fail. Use with care!

This attribute is recognized by Jameleon
Default Value: true

session

protected IESessionTag session
The session within which the function tag is running


visible

protected boolean visible
Defines whether the InternetExplorer windows shall be visible or not


highlightActiveElement

protected boolean highlightActiveElement
Whether or not to highlight the currently active HTML element. This attribute can be set in jameleon.conf via jiffie-plugin.highlightActiveElement

This attribute is recognized by Jameleon
Default Value: true

frameName

protected String frameName
The name attribute of the frame or iframe to act upon. This can also be a comma-separated list of names.

This attribute is recognized by Jameleon

frameId

protected String frameId
The id attribute of the frame or iframe to act upon. This can also be a comma-separated list of ids.

This attribute is recognized by Jameleon

frameSrc

protected String frameSrc
The src attribute of the frame or iframe to act upon. This can also be a comma-separated list of src attributes.

This attribute is recognized by Jameleon

ie

protected InternetExplorer ie
The reference to the current instance of the Internet Explorer. This is the current IE window.


workingForm

protected IHTMLFormElement workingForm
The current form to do submits and value setting


elementFinder

protected IHTMLElementFinder elementFinder
Used for some helper methods to find elements.

Constructor Detail

IEFunctionTag

public IEFunctionTag()
Method Detail

setupEnvironment

public void setupEnvironment()
Gets the references of the session and the test results from the parent TestCase This method gets called once all attributes are set from the macro language. Any required setup should go here.

Overrides:
setupEnvironment in class FunctionTag

store

public void store(String fName,
                  int event)
           throws IOException
Specified by:
store in interface Storable
Overrides:
store in class FunctionTag
Throws:
IOException

getDocument

public IHTMLDocument2 getDocument()
Specified by:
getDocument in interface DocumentDelegate

highlightActiveElement

public boolean highlightActiveElement()
Specified by:
highlightActiveElement in interface DocumentDelegate

activateBrowserWithIndex

public void activateBrowserWithIndex(int browserIndex)
Activates the browser that was opened the nth time. For those that are keeping track of the order of windows opened, this window will be moved to the top of the list. This method is useful for when there are several windows opened and some of the windows share the same title or when the desired window doesn't have a title.

Parameters:
browserIndex - - the index of the browser. The first browser is 0.

activateBrowserWithTitle

public void activateBrowserWithTitle(String title)
Activates the browser with the provided title. This method is mostly useful for when multiple windows have been spawned and the desire window in somewhere in the middle. For those that are keeping track of the order of windows opened, this window will be moved to the top of the list.

Parameters:
title - - the title of the desired window to gain focus for.

activateLastNewWindow

public void activateLastNewWindow()
If a new window has been opened by a tag and within the same tag you want to access that popup, you've to use this method to get it. Following tags will automatically get the topmost window without the need to call this method.


assertCheckboxChecked

public void assertCheckboxChecked(String checkBoxName,
                                  boolean checked)
Checks that a checkbox in the workingForm is checked or unchecked.

Parameters:
checkBoxName - - The name of the checkbox
checked - - Whether the checkbox should be checked or unchecked.

assertCheckboxChecked

public void assertCheckboxChecked(String checkBoxName,
                                  boolean checked,
                                  int assertLevel)
Checks that a checkbox in the workingForm is checked or unchecked.

Parameters:
checkBoxName - - The name of the checkbox
checked - - Whether the checkbox should be checked or unchecked.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertCheckboxChecked

public void assertCheckboxChecked(String msg,
                                  String checkBoxName,
                                  boolean checked)
Checks that a checkbox in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
msg - - The message to display if test fails.
checkBoxName - - The name of the checkbox
checked - - Whether the checkbox should be checked or unchecked.

assertCheckboxChecked

public void assertCheckboxChecked(String msg,
                                  String checkBoxName,
                                  boolean checked,
                                  int assertLevel)
Checks that a checkbox in the workingForm is checked or unchecked. Checks that a a checkbox in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
msg - - The message to display if test fails.
checkBoxName - - The name of the checkbox
checked - - Whether the checkbox should be checked or unchecked.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertCheckboxWithNameAndValueChecked

public void assertCheckboxWithNameAndValueChecked(String checkBoxName,
                                                  String checkBoxValue,
                                                  boolean checked)
Checks that a checkbox with a given name and value in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
checkBoxName - - The name of the checkbox
checkBoxValue - - The value of the checkbox
checked - - Whether the checkbox should be checked or unchecked.

assertCheckboxWithNameAndValueChecked

public void assertCheckboxWithNameAndValueChecked(String checkBoxName,
                                                  String checkBoxValue,
                                                  boolean checked,
                                                  int assertLevel)
Checks that a checkbox with a given name and value in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
checkBoxName - - The name of the checkbox
checkBoxValue - - The value of the checkbox
checked - - Whether the checkbox should be checked or unchecked.

assertCheckboxWithNameAndValueChecked

public void assertCheckboxWithNameAndValueChecked(String msg,
                                                  String checkBoxName,
                                                  String checkBoxValue,
                                                  boolean checked)
Checks that a checkbox with a given name and value in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
msg - - The message to display if test fails.
checkBoxName - - The name of the checkbox
checkBoxValue - - The value of the checkbox
checked - - Whether the checkbox should be checked or unchecked.

assertCheckboxWithNameAndValueChecked

public void assertCheckboxWithNameAndValueChecked(String msg,
                                                  String checkBoxName,
                                                  String checkBoxValue,
                                                  boolean checked,
                                                  int assertLevel)
Checks that a checkbox with a given name and value in the workingForm is checked or unchecked. If the test fails display the given message

Parameters:
msg - - The message to display if test fails.
checkBoxName - - The name of the checkbox
checkBoxValue - - The value of the checkbox
checked - - Whether the checkbox should be checked or unchecked.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertLinkPresent

public void assertLinkPresent(String linkText)
Checks that a link with given text is present in the current html. See getLink(java.lang.String) for information onw how linkText is used to find the link.

Parameters:
linkText - - The text, name, id or alt text to click

assertLinkPresent

public void assertLinkPresent(String msg,
                              String linkText)
Checks that a link with given text is present in the current html. See getLink(java.lang.String) for information onw how linkText is used to find the link. If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
linkText - - The text, name, id or alt text to click

assertLinkPresent

public void assertLinkPresent(String linkText,
                              int assertLevel)
Checks that a link with given text is present in the current html. See getLink(java.lang.String) for information onw how linkText is used to find the link.

Parameters:
linkText - - The text, name, id or alt text to click
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertLinkPresent

public void assertLinkPresent(String msg,
                              String linkText,
                              int assertLevel)
Checks that a link with given text is present in the current html. See getLink(java.lang.String) for information onw how linkText is used to find the link. If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
linkText - - The text, name, id or alt text to click
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertLinkWithHrefPresent

public IHTMLAnchorElement assertLinkWithHrefPresent(String href,
                                                    String linkText)

assertLinkWithHrefPresent

public IHTMLAnchorElement assertLinkWithHrefPresent(String msg,
                                                    String linkText,
                                                    String href,
                                                    int assertLevel)
Checks that a link with given text is present in the current html. See getLink(java.lang.String) for information onw how linkText is used to find the link. If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
linkText - - The text, name, id or alt text to click
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertPasswordFieldValueEquals

public void assertPasswordFieldValueEquals(String fieldName,
                                           String value)
Checks the value of the password field.

Parameters:
fieldName - - The name of the password field.
value - - The expected value.

assertPasswordFieldValueEquals

public void assertPasswordFieldValueEquals(String fieldName,
                                           String value,
                                           int assertLevel)
Checks the value of the password field.

Parameters:
fieldName - - The name of the password field.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertPasswordFieldValueEquals

public void assertPasswordFieldValueEquals(String msg,
                                           String fieldName,
                                           String value)
Checks the value of the password field. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the password field.
value - - The expected value.

assertPasswordFieldValueEquals

public void assertPasswordFieldValueEquals(String msg,
                                           String fieldName,
                                           String value,
                                           int assertLevel)
Checks the value of the password field. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the password field.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertRadioButtonChecked

public void assertRadioButtonChecked(String fieldName,
                                     String value)
Checks that the given radio button has the provided value selected

Parameters:
fieldName - - The name of the radio button.
value - - The expected value.

assertRadioButtonChecked

public void assertRadioButtonChecked(String fieldName,
                                     String value,
                                     int assertLevel)
Checks that the given radio button has the provided value selected

Parameters:
fieldName - - The name of the radio button.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertRadioButtonChecked

public void assertRadioButtonChecked(String msg,
                                     String fieldName,
                                     String value)
Checks that the given radio button has the provided value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
value - - The expected value.

assertRadioButtonChecked

public void assertRadioButtonChecked(String msg,
                                     String fieldName,
                                     String value,
                                     int assertLevel)
Checks that the given radio button has the provided value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionIndexEquals

public void assertSelectFieldOptionIndexEquals(String fieldName,
                                               int index)
Checks that the given select field has the provided index selected

Parameters:
fieldName - - The name of the select field.
index - - The expected value.

assertSelectFieldOptionIndexEquals

public void assertSelectFieldOptionIndexEquals(String fieldName,
                                               int index,
                                               int assertLevel)
Checks that the given select field has the provided index selected

Parameters:
fieldName - - The name of the select field.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionIndexEquals

public void assertSelectFieldOptionIndexEquals(String msg,
                                               String fieldName,
                                               int index)
Checks that the given select field has the provided index selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the select field.

assertSelectFieldOptionIndexEquals

public void assertSelectFieldOptionIndexEquals(String msg,
                                               String fieldName,
                                               int index,
                                               int assertLevel)
Checks that the given select field has the provided index selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the select field.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionIndexesEqual

public void assertSelectFieldOptionIndexesEqual(String fieldName,
                                                int[] indexes)
Checks that the given select field has the provided indexes selected

Parameters:
fieldName - - The name of the select field.
indexes - - The expected values.

assertSelectFieldOptionIndexesEqual

public void assertSelectFieldOptionIndexesEqual(String fieldName,
                                                int[] indexes,
                                                int assertLevel)
Checks that the given select field has the provided indexes selected

Parameters:
fieldName - - The name of the select field.
indexes - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionIndexesEqual

public void assertSelectFieldOptionIndexesEqual(String msg,
                                                String fieldName,
                                                int[] indexes)
Checks that the given select field has the provided index selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the select field.
indexes - - The expected values.

assertSelectFieldOptionIndexesEqual

public void assertSelectFieldOptionIndexesEqual(String msg,
                                                String fieldName,
                                                int[] indexes,
                                                int assertLevel)
Checks that the given select field has the provided index selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
indexes - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionTextEquals

public void assertSelectFieldOptionTextEquals(String fieldName,
                                              String textValue)
Checks that the given select field has the provided displayed text value selected

Parameters:
fieldName - - The name of the radio button.
textValue - - The expected value.

assertSelectFieldOptionTextEquals

public void assertSelectFieldOptionTextEquals(String fieldName,
                                              String textValue,
                                              int assertLevel)
Checks that the given select field has the provided displayed text value selected

Parameters:
fieldName - - The name of the radio button.
textValue - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionTextEquals

public void assertSelectFieldOptionTextEquals(String msg,
                                              String fieldName,
                                              String textValue)
Checks that the given select field has the provided displayed text value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
textValue - - The expected value.

assertSelectFieldOptionTextEquals

public void assertSelectFieldOptionTextEquals(String msg,
                                              String fieldName,
                                              String textValue,
                                              int assertLevel)
Checks that the given select field has the provided displayed text value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
textValue - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionTextValuesEqual

public void assertSelectFieldOptionTextValuesEqual(String fieldName,
                                                   List textValues)
Checks that the given select field has the provided displayed text values selected

Parameters:
fieldName - - The name of the select field.
textValues - - The expected values.

assertSelectFieldOptionTextValuesEqual

public void assertSelectFieldOptionTextValuesEqual(String fieldName,
                                                   List textValues,
                                                   int assertLevel)
Checks that the given select field has the provided displayed text values selected

Parameters:
fieldName - - The name of the select field.
textValues - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionTextValuesEqual

public void assertSelectFieldOptionTextValuesEqual(String msg,
                                                   String fieldName,
                                                   List textValues)
Checks that the given select field has the provided displayed text values selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the select field.
textValues - - The expected values.

assertSelectFieldOptionTextValuesEqual

public void assertSelectFieldOptionTextValuesEqual(String msg,
                                                   String fieldName,
                                                   List textValues,
                                                   int assertLevel)
Checks that the given select field has the provided displayed text values selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the select field.
textValues - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionValueEquals

public void assertSelectFieldOptionValueEquals(String fieldName,
                                               String value)
Checks that the given select field has the provided value selected

Parameters:
fieldName - - The name of the radio button.
value - - The expected value.

assertSelectFieldOptionValueEquals

public void assertSelectFieldOptionValueEquals(String fieldName,
                                               String value,
                                               int assertLevel)
Checks that the given select field has the provided value selected

Parameters:
fieldName - - The name of the radio button.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionValueEquals

public void assertSelectFieldOptionValueEquals(String msg,
                                               String fieldName,
                                               String value)
Checks that the given select field has the provided value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
value - - The expected value.

assertSelectFieldOptionValueEquals

public void assertSelectFieldOptionValueEquals(String msg,
                                               String fieldName,
                                               String value,
                                               int assertLevel)
Checks that the given select field has the provided value selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionValuesEqual

public void assertSelectFieldOptionValuesEqual(String fieldName,
                                               List values)
Checks that the given select field has the provided values selected

Parameters:
fieldName - - The name of the radio button.
values - - The expected values.

assertSelectFieldOptionValuesEqual

public void assertSelectFieldOptionValuesEqual(String fieldName,
                                               List values,
                                               int assertLevel)
Checks that the given select field has the provided values selected

Parameters:
fieldName - - The name of the radio button.
values - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertSelectFieldOptionValuesEqual

public void assertSelectFieldOptionValuesEqual(String msg,
                                               String fieldName,
                                               List values)
Checks that the given select field has the provided values selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
values - - The expected values.

assertSelectFieldOptionValuesEqual

public void assertSelectFieldOptionValuesEqual(String msg,
                                               String fieldName,
                                               List values,
                                               int assertLevel)
Checks that the given select field has the provided values selected If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the radio button.
values - - The expected values.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextAreaValueEquals

public void assertTextAreaValueEquals(String fieldName,
                                      String value)
Checks the value of the text area.

Parameters:
fieldName - - The name of the text area.
value - - The expected value.

assertTextAreaValueEquals

public void assertTextAreaValueEquals(String fieldName,
                                      String value,
                                      int assertLevel)
Checks the value of the text area.

Parameters:
fieldName - - The name of the text area.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextAreaValueEquals

public void assertTextAreaValueEquals(String msg,
                                      String fieldName,
                                      String value)
Checks the value of the text area. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the text area.
value - - The expected value.

assertTextAreaValueEquals

public void assertTextAreaValueEquals(String msg,
                                      String fieldName,
                                      String value,
                                      int assertLevel)
Checks the value of the text area. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the text area.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextFieldValueEquals

public void assertTextFieldValueEquals(String fieldName,
                                       String value)
Checks the value of the text field.

Parameters:
fieldName - - The name of the text field.
value - - The expected value.

assertTextFieldValueEquals

public void assertTextFieldValueEquals(String fieldName,
                                       String value,
                                       int assertLevel)
Checks the value of the text field.

Parameters:
fieldName - - The name of the text field.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextFieldValueEquals

public void assertTextFieldValueEquals(String msg,
                                       String fieldName,
                                       String value)
Checks the value of the text field. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the text field.
value - - The expected value.

assertTextFieldValueEquals

public void assertTextFieldValueEquals(String msg,
                                       String fieldName,
                                       String value,
                                       int assertLevel)
Checks the value of the text field. If the test fails display the given msg

Parameters:
msg - - The message to display if test fails.
fieldName - - The name of the text field.
value - - The expected value.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertXPath

public void assertXPath(String xpath2evaluate)
Validates that a given XPATH returns at least one result

Parameters:
xpath2evaluate - - the XPATH to evaluate

assertXPathResultsSizeEquals

public void assertXPathResultsSizeEquals(String xpath2evaluate,
                                         int numOfResults)
Validates that a given XPATH returns a provided number of results

Parameters:
xpath2evaluate - - the XPATH to evaluate
numOfResults - - the number of expected results

assertXPathResultsSizeEquals

public void assertXPathResultsSizeEquals(String msg,
                                         String xpath2evaluate,
                                         int numOfResults)
Validates that a given XPATH returns a provided number of results

Parameters:
msg - - The message to display when an error occurs.
xpath2evaluate - - the XPATH to evaluate
numOfResults - - the number of expected results

assertTextPresent

public void assertTextPresent(String text,
                              boolean regex)
Asserts that supplied text is present and if regex is set to true, then text is a Perl5 style regular expression (evaluated using jakarta ORO package). See http://www.savarese.org/oro/docs/OROMatcher/Syntax.html for details about the syntax.

Parameters:
text - - The text that should be in the response
regex - - If set to true, then use text as a regular expression to find a pattern in the HTML.

assertTextPresent

public void assertTextPresent(String text)
Asserts that supplied text is present.

Parameters:
text - - The text that should be in the response

assertTextPresent

public void assertTextPresent(String msg,
                              String text)
Asserts that supplied text is present. If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
text - - The text that should be in the response

assertTextPresent

public void assertTextPresent(String text,
                              int assertLevel)
Asserts that supplied text is present.

Parameters:
text - - The text that should be in the response
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextPresent

public void assertTextPresent(String msg,
                              String text,
                              int assertLevel)
Asserts that supplied text is present. If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
text - - The text that should be in the response
assertLevel - - Only run this test under the assertLevel as described in AssertLevel todo retry if ComFailException has been caught.

assertTextNotPresent

public void assertTextNotPresent(String text)
Asserts that the supplied text is not present in the reponse.

Parameters:
text - - the text to NOT be found in the response

assertTextNotPresent

public void assertTextNotPresent(String msg,
                                 String text)
Asserts that the supplied text is not present in the reponse.

Parameters:
text - - the text to NOT be found in the response
msg - - a message that will be displayed if the test fails.

assertTextNotPresent

public void assertTextNotPresent(String text,
                                 int assertLevel)
Asserts that the supplied text is not present in the reponse.

Parameters:
text - - the text to NOT be found in the response
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTextNotPresent

public void assertTextNotPresent(String msg,
                                 String text,
                                 int assertLevel)
Asserts that the supplied text is not present in the reponse.

Parameters:
text - - the text to NOT be found in the response
msg - - a message that will be displayed if the test fails.
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTitleEquals

public void assertTitleEquals(String msg,
                              String title,
                              int assertLevel)
Checks that the title of the current html page matches the expected value, title If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
title - - Expected title value
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTitleEquals

public void assertTitleEquals(String title)
Checks that the title of the current html page matches the expected value, title Leading and trailing whitespace is not to be included in the compare.

Parameters:
title - - Expected title value

assertTitleEquals

public void assertTitleEquals(String msg,
                              String title)
Checks that the title of the current html page matches the expected value, title Leading and trailing whitespace is not to be included in the compare.

Parameters:
title - - Expected title value

assertTitleEquals

public void assertTitleEquals(String title,
                              boolean trimWhitespace)
Checks that the title of the current html page matches the expected value, title

Parameters:
title - - Expected title value
trimWhitespace - - Set to true if leading and trailing whitespace is not to be included in the compare.

assertTitleEquals

public void assertTitleEquals(String msg,
                              String title,
                              boolean trimWhitespace)
Checks that the title of the current html page matches the expected value, title If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
title - - Expected title value
trimWhitespace - - Set to true if leading and trailing whitespace is not to be included in the compare.

assertTitleEquals

public void assertTitleEquals(String title,
                              int assertLevel,
                              boolean trimWhitespace)
Checks that the title of the current html page matches the expected value, title

Parameters:
title - - Expected title value
assertLevel - - Only run this test under the assertLevel as described in AssertLevel
trimWhitespace - - Set to true if leading and trailing whitespace is not to be included in the compare.

assertTitleEquals

public void assertTitleEquals(String msg,
                              String title,
                              int assertLevel,
                              boolean trimWhitespace)
Checks that the title of the current html page matches the expected value, title If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
title - - Expected title value
assertLevel - - Only run this test under the assertLevel as described in AssertLevel
trimWhitespace - - Set to true if leading and trailing whitespace is not to be included in the compare.

assertTitleNotEquals

public void assertTitleNotEquals(String title)
Checks that the title of the current html page does not matche the expected value, title

Parameters:
title - - Expected title value

assertTitleNotEquals

public void assertTitleNotEquals(String msg,
                                 String title)
Checks that the title of the current html page does not matche the expected value, title If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
title - - Expected title value

assertTitleNotEquals

public void assertTitleNotEquals(String title,
                                 int assertLevel)
Checks that the title of the current html page does not matche the expected value, title

Parameters:
title - - Expected title value
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

assertTitleNotEquals

public void assertTitleNotEquals(String msg,
                                 String title,
                                 int assertLevel)
Checks that the title of the current html page does not matche the expected value, title If the test fails display the given message

Parameters:
msg - - The message to display if text is not in the response.
title - - Expected title value
assertLevel - - Only run this test under the assertLevel as described in AssertLevel

closeBrowserWindow

public void closeBrowserWindow()
Closes the current Internet Explorer window by sending a quit event to it. The IEEventListener will take care of removing it from the list of open browser windows in BrowserCache.


closeBrowserWindow

public void closeBrowserWindow(long timeInMillis)
Closes the current Internet Explorer window by sending a quit event to it. The IEEventListener will take care of removing it from the list of open browser windows in BrowserCache.


clearSelectFieldValues

public void clearSelectFieldValues(IHTMLSelectElement selectField)
Clears the currently selected options of the provided select field

Parameters:
selectField - - The Select Field to clear all values

clickIHTMLElement

public void clickIHTMLElement(IHTMLElement element)
Clicks on an IHTMLElement by using the jiffie provided BlockingClickThread. This method is for use on objects that act like a link, but aren't links. Like and <area/> HTML element with an href attribute.

Parameters:
element - - The IHTMLElement to click on

clickLink

public void clickLink(IHTMLAnchorElement anchor,
                      boolean ignoreTarget)

clickLink

public void clickLink(String link)
Finds a link via the getLink(java.lang.String) method and clicks on it.

Parameters:
link - - see getLink(java.lang.String) for more information.

clickLinkWithHref

public void clickLinkWithHref(String href,
                              String link)
Finds a link via the getLinkWithHref(java.lang.String, java.lang.String) method and clicks on it.

Parameters:
link - - see getLink(java.lang.String) for more information.

clickLink

public void clickLink(String link,
                      boolean ignoreTarget)
Finds a link via the getLink(java.lang.String) method and clicks on it.

Parameters:
link - - see getLink(java.lang.String) for more information.
ignoreTarget - - if set, will not open link in new window (if the link has a target).

clickLinkWithId

public void clickLinkWithId(String linkId)
Navigate by selection of a link with given id.

Parameters:
linkId - - The id attribute defined in the link to click.

clickImageLinkWithAltText

public void clickImageLinkWithAltText(String altText)
Navigate by selection of a link with a given alt text.

Parameters:
altText - - The alt text for the image contained by the link

clickLinkWithImageSrc

public void clickLinkWithImageSrc(String src)
Navigate by selection of a link with a given src.

Parameters:
src - - The src attribute of an image. This source simply needs to be in the actual image source. For example, if the image source was /images/foo/bar.jpg and the src parameter was set to /foo, then it would click on the first link with that matched. If you want more exact behavior, be sure to pass the full path to the image.

clickLinkWithText

public void clickLinkWithText(String linkText)
Navigate by selection of a link containing the given text.

Parameters:
linkText - - the text that shows as a link on the browser.

clickSubmitButtonWithName

public void clickSubmitButtonWithName(String submitButtonName)
Clicks on the submit button in the current working form with the provided name

Parameters:
submitButtonName - - the name of the submit button

fireEvent

public void fireEvent(IHTMLElement element,
                      String eventToFire)
Fires a an event against the provided HTML element

Parameters:
element - - The element to fire the event on
eventToFire - - The even to fire. Some examples of this might be 'onchange', 'onsubmit', 'onmouseover'

getAreaElementByAltText

public IHTMLElement getAreaElementByAltText(String altText)
Gets the area HTML tag with the given alt text

Parameters:
altText - - the alt text that the desired area tag should have
Returns:
A matching area tag

getByXPath

public IHTMLDOMNode getByXPath(String xpath2evaluate)
This method returns the IHTMLDOMNode identified by the given xpath. The IHTMLDOMNode could be either an IHTMLElement, an IHTMLDOMAttribute or an IHTMLDOMTextNode.

Parameters:
xpath2evaluate - - The xpath identifying the wanted node in the DOM.
Returns:
Depending on the given xpath either IHTMLElement, IHTMLDOMAttribute or IHTMLDOMTextNode.

getCheckbox

public IHTMLInputElement getCheckbox(String checkboxFieldName)
Gets the checkbox given by it's field name

Parameters:
checkboxFieldName - - the name of the checkbox
Returns:
the checkbox representing the field name.
Throws:
RuntimeException - if the field does not exist in the form.

getCheckboxWithNameAndValue

public IHTMLInputElement getCheckboxWithNameAndValue(String name,
                                                     String value)
Gets the checkbox given by it's field name and value

Parameters:
name - - the name of the checkbox
value - - the value of the checkbox
Returns:
the checkbox representing the field name.
Throws:
RuntimeException - if the field does not exist in the form.

getElementByXPath

public IHTMLElement getElementByXPath(String xpath2evaluate)
Parameters:
xpath2evaluate - - The XPath identifying the element
Returns:
The IHTMLElement identified by the given XPath. Null if the XPath does not identify any element.

getElementsByXPath

public List getElementsByXPath(String xpath2evaluate)
Parameters:
xpath2evaluate - - The XPath identifying the element
Returns:
A list of matching elements.

getFrameWithName

public IHTMLFrameBase2 getFrameWithName(String frameName)
Gets a frame by the name attribute

Parameters:
frameName - - the name of the frame
Returns:
the frame represented by the frame name

getFrameWithId

public IHTMLFrameBase2 getFrameWithId(String frameId)
Gets a frame by the id attribute

Parameters:
frameId - - the id of the frame
Returns:
the frame represented by the frame id

getFrameWithSrc

public IHTMLFrameBase2 getFrameWithSrc(String frameSrc)
Gets a frame by the src attribute

Parameters:
frameSrc - - the src of the frame
Returns:
the frame represented by the frame src

getForm

public IHTMLFormElement getForm(String formInfo)
Tries to get a form via the following methods in order.
  1. getFormWithId() - Gets a form with the expected id attribute
  2. getFormWithName() - Gets a form with the expected name attribute
  3. getFormWithIndex() - The parameter is converted to a number, representing the index of the form on the page.
  4. getFormWithXPath - Gets a form with the expected XPath

Parameters:
formInfo - - The form id or name or index or XPath identifying the form
Returns:
the first form that corresponds to the above mentioned or null if no Form is found.

getFormWithName

public IHTMLFormElement getFormWithName(String name)
Tries to get a form with the name attribute provided

Parameters:
name - - The name of the form to be returned.
Returns:
a form with corresponding to the given name.

getFormWithId

public IHTMLFormElement getFormWithId(String id)
Tries to get a form with the id attribute provided

Parameters:
id - - The name of the form to be returned.
Returns:
a form with corresponding to the given name.

getFormWithIndex

public IHTMLFormElement getFormWithIndex(int index)
Tries to get the nth form on the page. When a form has no id or name attribute defined, this method gets all of the forms on the page and returns the nth form, defined by index

Parameters:
index - - The number representing the (n-1)th form. The first form would be 0
Returns:
a form with corresponding to the given name.

getFormWithXPath

public IHTMLFormElement getFormWithXPath(String xpath)

getHiddenField

public IHTMLInputElement getHiddenField(String fieldName)
Gets the hidden field by the name provided

Parameters:
fieldName - - the name of the hidden field
Returns:
the matching hidden field or null if not found

getHTMLSource

public String getHTMLSource()
Gets the HTML source from the current page.

Returns:
the HTML source from the current page.

getIHTMLElement

public IHTMLElement getIHTMLElement(ElementContainer container,
                                    String htmlTag,
                                    String attributeName,
                                    String attributeValue)
Gets the first matching IHTMLElement with the given html tag, attribute and attribute value

Parameters:
container - - The ElementContainer to use to get the attributes out of.
htmlTag - - The HTML tag to get back.
attributeName - - the attibute in the HTML element
attributeValue - - the value of attibute in the HTML element
Returns:
the first matching IHTMLElement with the given html tag, attribute and attribute value

getIHTMLElement

public IHTMLElement getIHTMLElement(String htmlTag,
                                    String attributeName,
                                    String attributeValue)
Gets the first matching IHTMLElement with the given html tag, attribute and attribute value

Parameters:
htmlTag - - The HTML tag to get back.
attributeName - - the attibute in the HTML element
attributeValue - - the value of attibute in the HTML element
Returns:
the first matching IHTMLElement with the given html tag, attribute and attribute value

getIHTMLElement

public IHTMLElement getIHTMLElement(ElementContainer container,
                                    String htmlTag,
                                    String[] attributeNames,
                                    String[] attributeValues)
Gets the first matching IHTMLElement with the given html tag, attributes and attribute values

Parameters:
container - - The ElementContainer to use to get the attributes out of.
htmlTag - - The HTML tag to get back.
attributeNames - - a list of attibutes in the HTML element
attributeValues - - a list of values of attibutes in the same order as the names
Returns:
the first matching IHTMLElement with the given html tag, attribute and attribute value

getIHTMLElement

public IHTMLElement getIHTMLElement(String htmlTag,
                                    String[] attributeNames,
                                    String[] attributeValues)
Gets the first matching IHTMLElement with the given html tag, attributes and attribute values

Parameters:
htmlTag - - The HTML tag to get back.
attributeNames - - a list of attibutes in the HTML element
attributeValues - - a list of values of attibutes in the same order as the names
Returns:
the first matching IHTMLElement with the given html tag, attribute and attribute value

getIHTMLElements

public List getIHTMLElements(ElementContainer container,
                             String htmlTag,
                             String attributeName,
                             String attributeValue)
Gets a List of matching IHTMLElements with the given html tag, attribute and attribute value

Parameters:
container - - The ElementContainer to use to get the attributes out of.
htmlTag - - The HTML tag to get back.
attributeName - - the attibute in the HTML element
attributeValue - - the value of attibute in the HTML element
Returns:
a List of matching IHTMLElements with the given html tag, attribute and attribute value

getIHTMLElements

public List getIHTMLElements(String htmlTag,
                             String attributeName,
                             String attributeValue)
Gets a List of matching IHTMLElements with the given html tag, attribute and attribute value

Parameters:
htmlTag - - The HTML tag to get back.
attributeName - - the attibute in the HTML element
attributeValue - - the value of attibute in the HTML element
Returns:
a List of matching IHTMLElements with the given html tag, attribute and attribute value

getIHTMLElements

public List getIHTMLElements(ElementContainer container,
                             String htmlTag,
                             String[] attributeNames,
                             String[] attributeValues)
Gets a List of matching IHTMLElements with the given html tag, attributes and attribute values

Parameters:
container - - The ElementContainer to use to get the attributes out of.
htmlTag - - The HTML tag to get back.
attributeNames - - a list of attibutes in the HTML element
attributeValues - - a list of values of attibutes in the same order as the names
Returns:
a List of matching IHTMLElements with the given html tag, attribute and attribute value

getIHTMLElements

public List getIHTMLElements(String htmlTag,
                             String[] attributeNames,
                             String[] attributeValues)
Gets a List of matching IHTMLElements with the given html tag, attributes and attribute values

Parameters:
htmlTag - - The HTML tag to get back.
attributeNames - - a list of attibutes in the HTML element
attributeValues - - a list of values of attibutes in the same order as the names
Returns:
a List of matching IHTMLElements with the given html tag, attribute and attribute value

getInputFieldByName

public IHTMLInputElement getInputFieldByName(String inputFieldName)
Gets an input field by name. This method does not care what type of input field it is. Only that it is type="input"

Parameters:
inputFieldName - - The name of the input field that exists in the current working form
Returns:
the first element with the provided name.

getLink

public IHTMLAnchorElement getLink(String text)
Tries to get a link via the following methods in order.
  1. getLinkWith() - Gets a link with the diplayed text
  2. getLinkWithID() - Gets a link with the id attribute set.
  3. getImageLinkWithAltText - Gets a link with the alt attribute or alt text.
  4. getLinkWithName() - Gets a link with the name attribute set.

Parameters:
text - - The link text or the link id or the alt text or the link name.
Returns:
the first link that corresponds to the above mentioned or null if no WebLink is found. todo order should be id, name, label, imageText.

getLinkWith

public IHTMLAnchorElement getLinkWith(String text)
Helper method to find a link with contained text

Parameters:
text - - The text contained by the link
Returns:
The IHTMLAnchorElement for the link

getLinkWithHref

public IHTMLAnchorElement getLinkWithHref(String href,
                                          String text)
Helper method to find a link with the given regex contained in the href attribute.

Parameters:
text - - The text contained by the link
Returns:
The IHTMLAnchorElement for the link

getLinksWith

public List getLinksWith(String text)
Helper method to find all links with the contained text

Parameters:
text - - The text contained by the links
Returns:
The IHTMLAnchorElement for the link

getLinkWithID

public IHTMLAnchorElement getLinkWithID(String id)
Helper method to find a link with given id

Parameters:
id - - The id of the link
Returns:
The IHTMLAnchorElement for the link

getLinkWithImageSrc

public IHTMLAnchorElement getLinkWithImageSrc(String src)
Helper method to find a link with given img src attribute

Parameters:
src - - The part of the src attribute of the img contained by the link
Returns:
The IHTMLAnchorElement for the link

getImageLinkWithAltText

public IHTMLAnchorElement getImageLinkWithAltText(String text)
Helper method to find a link with given img alt text

Parameters:
text - - The alt text of the img contained by the link
Returns:
The IHTMLAnchorElement for the link

getLinkWithName

public IHTMLAnchorElement getLinkWithName(String name)
Helper method to find a link with given name

Parameters:
name - - The name of the link to find
Returns:
The IHTMLAnchorElement for the link

getPasswordField

public IHTMLInputElement getPasswordField(String passwordFieldName)
Gets the text field given by it's field name

Parameters:
passwordFieldName - - the name of the password field
Returns:
the password field representing the field name.
Throws:
RuntimeException - if the field does not exist in the form.

getRadioButton

public IHTMLInputElement getRadioButton(String radioButtonName,
                                        String value)
Gets the radio button with the specified name and value

Parameters:
radioButtonName - - the name of the radio button
value - - the value to set the radio button to.
Returns:
a radio button with the specified name and valud

getSelectField

public IHTMLSelectElement getSelectField(String selectFieldName)
Gets the select field defined by selectFieldName

Parameters:
selectFieldName - - the name of the select field
Returns:
the select field matching the selectFieldName.

getSelectedOptionField

public IHTMLOptionElement getSelectedOptionField(String selectFieldName)
Gets the currently selected option from the given select field defined by selectFieldName

Parameters:
selectFieldName - - the name of the select field
Returns:
the select option currently selected.

getSubmit

public IHTMLInputElement getSubmit(String name)
Tries to get a submit element in the following order.
  1. <input type="submit" value="...">
  2. <input type="image" src="...">
  3. <input type="button" value="...">

Parameters:
name - - The identifying name of the submit element to find. It will try to match it with the value attribute in case of input type=submit and type=button. It will try to mathc it with the src attribute in case of input type=image.
Returns:
The input element. todo support find .

getSubmit

public IHTMLInputElement getSubmit(String type,
                                   String value)
Gets the submit button identified by it's value (the label shown in the browser). Supported ways of finding a submit are:
<input type="submit" value="some value">
<input type="image" src="jameleon.jpg" alt="alt text">
<input type="button" value="some value" onclick="some javascript call">
<button id="button tag" type="submit">button tag</button>

Parameters:
type - - type of submit field 'submit', 'image' or 'button'
value - - the value of the submit field (this is the label of the submit button shown in the browser)
Returns:
the input field representing the submit button or null if not found.
Throws:
RuntimeException - if the field does not exist in the form. todo introduce constants for supported types.

getSubmitButtonWithName

public IHTMLInputElement getSubmitButtonWithName(String buttonName)
Gets the first submit button by it's name from the working form

Parameters:
buttonName - - the name of the submit button
Returns:
the submit button with the provided buttonName
Throws:
RuntimeException - if the desired submit button isn't found in the working form.

getSubmitButtonWithNameAndValue

public IHTMLInputElement getSubmitButtonWithNameAndValue(String buttonName,
                                                         String value)
Gets the first submit button by it's name and value from the working form

Parameters:
buttonName - - the name of the submit button
value - - the value attribute of the button
Returns:
the submit button with the provided buttonName and value.
Throws:
RuntimeException - if the desired submit button isn't found in the working form.

getSubmitButtonWithValue

public IHTMLInputElement getSubmitButtonWithValue(String value)
Gets the first submit button by it's value from the working form

Parameters:
value - - the value attribute of the button
Returns:
the submit button with the provided buttonName and value.
Throws:
RuntimeException - if the desired submit button isn't found in the working form.

getTextArea

public IHTMLTextAreaElement getTextArea(String fieldName)
Gets the text area given by it's field name

Parameters:
fieldName - - the name of the text area
Returns:
the text area representing the field name.
Throws:
RuntimeException - if the field does not exist in the form.

getTextField

public IHTMLInputElement getTextField(String fieldName)
Gets the text field given by it's field name

Parameters:
fieldName - - the name of the text field
Returns:
the text field representing the field name.
Throws:
RuntimeException - if the field does not exist in the form.

getWorkingForm

public IHTMLFormElement getWorkingForm()
Gets the current working form used to set form values and submit

Specified by:
getWorkingForm in interface DocumentDelegate
Returns:
the current working form used to set form values and submit

isTextInPage

public boolean isTextInPage(String text)
Checks to see if the current page has the desired block of text

Parameters:
text - - the expected text
Returns:
True if the expected text is found

navigate

public void navigate(String url,
                     String username,
                     String password)
Navigates directly to the given URL todo add handling of basic authentication. todo add handling of relative URLs (relative to baseURL of IESession).

Parameters:
url - - The fully qualified URL ( e.g. http://sourceforge.net )
username - - Username for pages that require basic authentication.
password - - Password for pages that require basic authentication.

navigate

public void navigate(String url)
Navigates directly to the given URL

Parameters:
url - - The fully qualified URL ( e.g. http://www.google.com )

setCheckbox

public IHTMLInputElement setCheckbox(String checkboxFieldName,
                                     boolean checked)
Sets the checkbox to checked or unchecked.

Parameters:
checkboxFieldName - - the name of the checkbox
checked - - will check box if set to true, will uncheck box if set to false;

setCheckboxWithNameAndValue

public IHTMLInputElement setCheckboxWithNameAndValue(String checkboxFieldName,
                                                     String checkboxValue,
                                                     boolean checked)
Sets the checkbox to checked or unchecked given a name and value.

Parameters:
checkboxFieldName - - the name of the checkbox
checkboxValue - - the value of the checkbox
checked - - will check box if set to true, will uncheck box if set to false;

setHiddenFieldValue

public IHTMLInputElement setHiddenFieldValue(String hiddenFieldName,
                                             String value)
Sets the given hidden field (input type=hidden named hiddenFieldName to the value desired, value

Parameters:
hiddenFieldName - the name of the hidden field.
value - the value to be set

setSelectFieldOptionIndex

public IHTMLSelectElement setSelectFieldOptionIndex(String selectFieldName,
                                                    int index)
Sets the index of a select or drop down.

Parameters:
selectFieldName - - the index of the select field. For example if you wanted to select the 3rd option, then you would pass it 2.
index - - the index to set the select field to.

setSelectFieldOptionIndexes

public IHTMLSelectElement setSelectFieldOptionIndexes(String selectFieldName,
                                                      int[] indexes)
Sets the indexes of a select or drop down.

Parameters:
selectFieldName - - the index of the select field. For example if you wanted to select the 3rd option, then you would pass it 2.
indexes - - An array of indexes of which options to select.

setSelectFieldOptionText

public IHTMLSelectElement setSelectFieldOptionText(String selectFieldName,
                                                   String displayedText)
Sets the value of a select or drop down to the value with the displayed text.

Parameters:
selectFieldName - - the name of the select field
displayedText - - the displayed text in the drop-down

setSelectFieldOptionTextValues

public IHTMLSelectElement setSelectFieldOptionTextValues(String selectFieldName,
                                                         List displayedTextValues)
Sets the values of a select or drop down to the values with the displayed text.

Parameters:
selectFieldName - - the name of the select field
displayedTextValues - - A list of the displayed text in the drop-down

setSelectFieldOptionValue

public IHTMLSelectElement setSelectFieldOptionValue(String selectFieldName,
                                                    String value)
Sets the value of a select or drop down.

Parameters:
selectFieldName - - the name of the select field
value - - the value to set the select field to.

setSelectFieldOptionValues

public IHTMLSelectElement setSelectFieldOptionValues(String selectFieldName,
                                                     List values)
Sets the values of a select or drop down.

Parameters:
selectFieldName - - the name of the select field
values - - the values to set the select field to.

setPasswordFieldValue

public IHTMLInputElement setPasswordFieldValue(String passwordFieldName,
                                               String value)
Sets the given password field, passwordFieldName to the value desired, value

Parameters:
passwordFieldName - - the name of the field value.
value - - the value to be set

setRadioButtonValue

public IHTMLInputElement setRadioButtonValue(String radioButtonName,
                                             String value)
Sets the value of a radio button

Parameters:
radioButtonName - - the name of the radio button
value - - the value to set the radio button to.

setTextAreaValue

public IHTMLTextAreaElement setTextAreaValue(String textAreaName,
                                             String value)
Sets the given text area named textFieldName to the value desired, value

Parameters:
textAreaName - the name of the input field.
value - the value to be set

setTextFieldValue

public IHTMLInputElement setTextFieldValue(String textFieldName,
                                           String value)
Sets the given text field (input type=text named textFieldName to the value desired, value This method follows the maxlength HTML attribute, by truncating the value to the maxlength before setting the value.

Parameters:
textFieldName - the name of the input field.
value - the value to be set

setTextFieldValue

public IHTMLInputElement setTextFieldValue(String textFieldName,
                                           String value,
                                           boolean enforceMaxLength)
Sets the given text field (input type=text named textFieldName to the value desired, value This method follows the maxlength HTML attribute, by truncating the value to the maxlength before setting the value.

Parameters:
textFieldName - the name of the input field.
value - the value to be set
enforceMaxLength - Set to false to not truncate the value to the maxlength of the text field

setWorkingFormById

public void setWorkingFormById(String id)
Sets the working form by the id of the form

Parameters:
id - = the id of the form (id attribute in the form element)

setWorkingFormByIndex

public void setWorkingFormByIndex(int index)
Sets the working form by the order it is in the actual HTML. This should be used when the form has no name or id attributes set. The first form on the page is 0. For example, if the form desired is the 5th form on the page, then you would pass it 4.

Parameters:
index - = the index of the form.

setWorkingFormByName

public void setWorkingFormByName(String name)
Sets the working form by the name of the form

Parameters:
name - = the name of the form (name attribute in the form element)

setWorkingForm

public void setWorkingForm(String formIdNameOrIndex)
Sets the working form, using the following methods in order.
  1. setWorkingFormById(java.lang.String)
  2. setWorkingFormByName(java.lang.String)
  3. setWorkingFormByIndex(int)

Parameters:
formIdNameOrIndex - = the id, name or index of the form

setWorkingForm

public void setWorkingForm(IHTMLFormElement form)
Sets the working form to the provided IHTMLFormElement

Parameters:
form - The IHTMLFormElement to set the working for to

submitWorkingForm

public void submitWorkingForm()
Submits the current working form


pluginTearDown

public void pluginTearDown()
Overrides:
pluginTearDown in class FunctionTag


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