|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.LocationAwareTagSupport net.sf.jameleon.JameleonTagSupport net.sf.jameleon.function.FunctionTag net.sf.jameleon.plugin.jiffie.IEFunctionTag
public abstract class IEFunctionTag
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.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 |
---|
protected boolean WAIT
protected IESessionTag session
protected boolean visible
protected boolean highlightActiveElement
protected String frameName
protected String frameId
protected String frameSrc
protected InternetExplorer ie
protected IHTMLFormElement workingForm
protected IHTMLElementFinder elementFinder
Constructor Detail |
---|
public IEFunctionTag()
Method Detail |
---|
public void setupEnvironment()
setupEnvironment
in class FunctionTag
public void store(String fName, int event) throws IOException
store
in interface Storable
store
in class FunctionTag
IOException
public IHTMLDocument2 getDocument()
getDocument
in interface DocumentDelegate
public boolean highlightActiveElement()
highlightActiveElement
in interface DocumentDelegate
public void activateBrowserWithIndex(int browserIndex)
browserIndex
- - the index of the browser. The first browser is 0.public void activateBrowserWithTitle(String title)
title
- - the title of the desired window to gain focus for.public void activateLastNewWindow()
public void assertCheckboxChecked(String checkBoxName, boolean checked)
checkBoxName
- - The name of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.public void assertCheckboxChecked(String checkBoxName, boolean checked, int assertLevel)
checkBoxName
- - The name of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertCheckboxChecked(String msg, String checkBoxName, boolean checked)
message
msg
- - The message to display if test fails.checkBoxName
- - The name of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.public void assertCheckboxChecked(String msg, String checkBoxName, boolean checked, int assertLevel)
message
msg
- - The message to display if test fails.checkBoxName
- - The name of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertCheckboxWithNameAndValueChecked(String checkBoxName, String checkBoxValue, boolean checked)
message
checkBoxName
- - The name of the checkboxcheckBoxValue
- - The value of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.public void assertCheckboxWithNameAndValueChecked(String checkBoxName, String checkBoxValue, boolean checked, int assertLevel)
message
checkBoxName
- - The name of the checkboxcheckBoxValue
- - The value of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.public void assertCheckboxWithNameAndValueChecked(String msg, String checkBoxName, String checkBoxValue, boolean checked)
message
msg
- - The message to display if test fails.checkBoxName
- - The name of the checkboxcheckBoxValue
- - The value of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.public void assertCheckboxWithNameAndValueChecked(String msg, String checkBoxName, String checkBoxValue, boolean checked, int assertLevel)
message
msg
- - The message to display if test fails.checkBoxName
- - The name of the checkboxcheckBoxValue
- - The value of the checkboxchecked
- - Whether the checkbox should be checked or unchecked.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertLinkPresent(String linkText)
getLink(java.lang.String)
for information onw how linkText
is used to
find the link.
linkText
- - The text, name, id or alt text to clickpublic void assertLinkPresent(String msg, String linkText)
getLink(java.lang.String)
for information onw how linkText
is used to
find the link.
If the test fails display the given message
msg
- - The message to display if text
is not in the response.linkText
- - The text, name, id or alt text to clickpublic void assertLinkPresent(String linkText, int assertLevel)
getLink(java.lang.String)
for information onw how linkText
is used to
find the link.
linkText
- - The text, name, id or alt text to clickassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertLinkPresent(String msg, String linkText, int assertLevel)
getLink(java.lang.String)
for information onw how linkText
is used to
find the link.
If the test fails display the given message
msg
- - The message to display if text
is not in the response.linkText
- - The text, name, id or alt text to clickassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public IHTMLAnchorElement assertLinkWithHrefPresent(String href, String linkText)
public IHTMLAnchorElement assertLinkWithHrefPresent(String msg, String linkText, String href, int assertLevel)
getLink(java.lang.String)
for information onw how linkText
is used to
find the link.
If the test fails display the given message
msg
- - The message to display if text
is not in the response.linkText
- - The text, name, id or alt text to clickassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertPasswordFieldValueEquals(String fieldName, String value)
fieldName
- - The name of the password field.value
- - The expected value.public void assertPasswordFieldValueEquals(String fieldName, String value, int assertLevel)
fieldName
- - The name of the password field.value
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertPasswordFieldValueEquals(String msg, String fieldName, String value)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the password field.value
- - The expected value.public void assertPasswordFieldValueEquals(String msg, String fieldName, String value, int assertLevel)
msg
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
public void assertRadioButtonChecked(String fieldName, String value)
fieldName
- - The name of the radio button.value
- - The expected value.public void assertRadioButtonChecked(String fieldName, String value, int assertLevel)
fieldName
- - The name of the radio button.value
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertRadioButtonChecked(String msg, String fieldName, String value)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the radio button.value
- - The expected value.public void assertRadioButtonChecked(String msg, String fieldName, String value, int assertLevel)
msg
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
public void assertSelectFieldOptionIndexEquals(String fieldName, int index)
fieldName
- - The name of the select field.index
- - The expected value.public void assertSelectFieldOptionIndexEquals(String fieldName, int index, int assertLevel)
fieldName
- - The name of the select field.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionIndexEquals(String msg, String fieldName, int index)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the select field.public void assertSelectFieldOptionIndexEquals(String msg, String fieldName, int index, int assertLevel)
msg
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
public void assertSelectFieldOptionIndexesEqual(String fieldName, int[] indexes)
fieldName
- - The name of the select field.indexes
- - The expected values.public void assertSelectFieldOptionIndexesEqual(String fieldName, int[] indexes, int assertLevel)
fieldName
- - The name of the select field.indexes
- - The expected values.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionIndexesEqual(String msg, String fieldName, int[] indexes)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the select field.indexes
- - The expected values.public void assertSelectFieldOptionIndexesEqual(String msg, String fieldName, int[] indexes, int assertLevel)
msg
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
public void assertSelectFieldOptionTextEquals(String fieldName, String textValue)
fieldName
- - The name of the radio button.textValue
- - The expected value.public void assertSelectFieldOptionTextEquals(String fieldName, String textValue, int assertLevel)
fieldName
- - The name of the radio button.textValue
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionTextEquals(String msg, String fieldName, String textValue)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the radio button.textValue
- - The expected value.public void assertSelectFieldOptionTextEquals(String msg, String fieldName, String textValue, int assertLevel)
msg
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
public void assertSelectFieldOptionTextValuesEqual(String fieldName, List textValues)
fieldName
- - The name of the select field.textValues
- - The expected values.public void assertSelectFieldOptionTextValuesEqual(String fieldName, List textValues, int assertLevel)
fieldName
- - The name of the select field.textValues
- - The expected values.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionTextValuesEqual(String msg, String fieldName, List textValues)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the select field.textValues
- - The expected values.public void assertSelectFieldOptionTextValuesEqual(String msg, String fieldName, List textValues, int assertLevel)
msg
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
public void assertSelectFieldOptionValueEquals(String fieldName, String value)
fieldName
- - The name of the radio button.value
- - The expected value.public void assertSelectFieldOptionValueEquals(String fieldName, String value, int assertLevel)
fieldName
- - The name of the radio button.value
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionValueEquals(String msg, String fieldName, String value)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the radio button.value
- - The expected value.public void assertSelectFieldOptionValueEquals(String msg, String fieldName, String value, int assertLevel)
msg
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
public void assertSelectFieldOptionValuesEqual(String fieldName, List values)
fieldName
- - The name of the radio button.values
- - The expected values.public void assertSelectFieldOptionValuesEqual(String fieldName, List values, int assertLevel)
fieldName
- - The name of the radio button.values
- - The expected values.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSelectFieldOptionValuesEqual(String msg, String fieldName, List values)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the radio button.values
- - The expected values.public void assertSelectFieldOptionValuesEqual(String msg, String fieldName, List values, int assertLevel)
msg
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
public void assertTextAreaValueEquals(String fieldName, String value)
fieldName
- - The name of the text area.value
- - The expected value.public void assertTextAreaValueEquals(String fieldName, String value, int assertLevel)
fieldName
- - The name of the text area.value
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextAreaValueEquals(String msg, String fieldName, String value)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the text area.value
- - The expected value.public void assertTextAreaValueEquals(String msg, String fieldName, String value, int assertLevel)
msg
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
public void assertTextFieldValueEquals(String fieldName, String value)
fieldName
- - The name of the text field.value
- - The expected value.public void assertTextFieldValueEquals(String fieldName, String value, int assertLevel)
fieldName
- - The name of the text field.value
- - The expected value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextFieldValueEquals(String msg, String fieldName, String value)
msg
msg
- - The message to display if test fails.fieldName
- - The name of the text field.value
- - The expected value.public void assertTextFieldValueEquals(String msg, String fieldName, String value, int assertLevel)
msg
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
public void assertXPath(String xpath2evaluate)
xpath2evaluate
- - the XPATH to evaluatepublic void assertXPathResultsSizeEquals(String xpath2evaluate, int numOfResults)
xpath2evaluate
- - the XPATH to evaluatenumOfResults
- - the number of expected resultspublic void assertXPathResultsSizeEquals(String msg, String xpath2evaluate, int numOfResults)
msg
- - The message to display when an error occurs.xpath2evaluate
- - the XPATH to evaluatenumOfResults
- - the number of expected resultspublic void assertTextPresent(String text, boolean regex)
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.
text
- - The text that should be in the responseregex
- - If set to true, then use text
as a regular expression to find
a pattern in the HTML.public void assertTextPresent(String text)
text
- - The text that should be in the responsepublic void assertTextPresent(String msg, String text)
message
msg
- - The message to display if text
is not in the response.text
- - The text that should be in the responsepublic void assertTextPresent(String text, int assertLevel)
text
- - The text that should be in the responseassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextPresent(String msg, String text, int assertLevel)
message
msg
- - The message to display if text
is not in the response.text
- - The text that should be in the responseassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
todo retry if ComFailException has been caught.public void assertTextNotPresent(String text)
text
- - the text to NOT be found in the responsepublic void assertTextNotPresent(String msg, String text)
text
- - the text to NOT be found in the responsemsg
- - a message that will be displayed if the test fails.public void assertTextNotPresent(String text, int assertLevel)
text
- - the text to NOT be found in the responseassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextNotPresent(String msg, String text, int assertLevel)
text
- - the text to NOT be found in the responsemsg
- - a message that will be displayed if the test fails.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTitleEquals(String msg, String title, int assertLevel)
title
If the test fails display the given message
msg
- - The message to display if text
is not in the response.title
- - Expected title valueassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTitleEquals(String title)
title
Leading and trailing whitespace is not to be included in the compare.
title
- - Expected title valuepublic void assertTitleEquals(String msg, String title)
title
Leading and trailing whitespace is not to be included in the compare.
title
- - Expected title valuepublic void assertTitleEquals(String title, boolean trimWhitespace)
title
title
- - Expected title valuetrimWhitespace
- - Set to true if leading and trailing whitespace is not to be included in the compare.public void assertTitleEquals(String msg, String title, boolean trimWhitespace)
title
If the test fails display the given message
msg
- - The message to display if text
is not in the response.title
- - Expected title valuetrimWhitespace
- - Set to true if leading and trailing whitespace is not to be included in the compare.public void assertTitleEquals(String title, int assertLevel, boolean trimWhitespace)
title
title
- - Expected title valueassertLevel
- - 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.public void assertTitleEquals(String msg, String title, int assertLevel, boolean trimWhitespace)
title
If the test fails display the given message
msg
- - The message to display if text
is not in the response.title
- - Expected title valueassertLevel
- - 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.public void assertTitleNotEquals(String title)
title
title
- - Expected title valuepublic void assertTitleNotEquals(String msg, String title)
title
If the test fails display the given message
msg
- - The message to display if text
is not in the response.title
- - Expected title valuepublic void assertTitleNotEquals(String title, int assertLevel)
title
title
- - Expected title valueassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTitleNotEquals(String msg, String title, int assertLevel)
title
If the test fails display the given message
msg
- - The message to display if text
is not in the response.title
- - Expected title valueassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void closeBrowserWindow()
public void closeBrowserWindow(long timeInMillis)
public void clearSelectFieldValues(IHTMLSelectElement selectField)
selectField
- - The Select Field to clear all valuespublic void clickIHTMLElement(IHTMLElement element)
<area/>
HTML element with an href
attribute.
element
- - The IHTMLElement to click onpublic void clickLink(IHTMLAnchorElement anchor, boolean ignoreTarget)
public void clickLink(String link)
getLink(java.lang.String)
method and clicks on it.
link
- - see getLink(java.lang.String)
for more information.public void clickLinkWithHref(String href, String link)
getLinkWithHref(java.lang.String, java.lang.String)
method and clicks on it.
link
- - see getLink(java.lang.String)
for more information.public void clickLink(String link, boolean ignoreTarget)
getLink(java.lang.String)
method and clicks on it.
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).public void clickLinkWithId(String linkId)
linkId
- - The id attribute defined in the link to click.public void clickImageLinkWithAltText(String altText)
altText
- - The alt text for the image contained by the linkpublic void clickLinkWithImageSrc(String src)
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.public void clickLinkWithText(String linkText)
linkText
- - the text that shows as a link on the browser.public void clickSubmitButtonWithName(String submitButtonName)
submitButtonName
- - the name of the submit buttonpublic void fireEvent(IHTMLElement element, String eventToFire)
element
- - The element to fire the event oneventToFire
- - The even to fire. Some examples of this might be 'onchange', 'onsubmit', 'onmouseover'public IHTMLElement getAreaElementByAltText(String altText)
altText
- - the alt text that the desired area tag should have
public IHTMLDOMNode getByXPath(String xpath2evaluate)
xpath2evaluate
- - The xpath identifying the wanted node in the DOM.
public IHTMLInputElement getCheckbox(String checkboxFieldName)
checkboxFieldName
- - the name of the checkbox
RuntimeException
- if the field does not exist in the form.public IHTMLInputElement getCheckboxWithNameAndValue(String name, String value)
name
- - the name of the checkboxvalue
- - the value of the checkbox
RuntimeException
- if the field does not exist in the form.public IHTMLElement getElementByXPath(String xpath2evaluate)
xpath2evaluate
- - The XPath identifying the element
public List getElementsByXPath(String xpath2evaluate)
xpath2evaluate
- - The XPath identifying the element
public IHTMLFrameBase2 getFrameWithName(String frameName)
frameName
- - the name of the frame
public IHTMLFrameBase2 getFrameWithId(String frameId)
frameId
- - the id of the frame
public IHTMLFrameBase2 getFrameWithSrc(String frameSrc)
frameSrc
- - the src of the frame
public IHTMLFormElement getForm(String formInfo)
getFormWithId()
- Gets a form with the expected id attribute
getFormWithName()
- Gets a form with the expected name attribute
getFormWithIndex()
- The parameter is converted to a number, representing
the index of the form on the page.
getFormWithXPath
- Gets a form with the expected XPath
formInfo
- - The form id or name or index or XPath identifying the form
null
if no Form
is found.public IHTMLFormElement getFormWithName(String name)
name
- - The name of the form to be returned.
public IHTMLFormElement getFormWithId(String id)
id
- - The name of the form to be returned.
public IHTMLFormElement getFormWithIndex(int index)
index
- - The number representing the (n-1)th form. The first form would be 0
public IHTMLFormElement getFormWithXPath(String xpath)
public IHTMLInputElement getHiddenField(String fieldName)
fieldName
- - the name of the hidden field
public String getHTMLSource()
public IHTMLElement getIHTMLElement(ElementContainer container, String htmlTag, String attributeName, String attributeValue)
container
- - The ElementContainer to use to get the attributes out of.htmlTag
- - The HTML tag to get back.attributeName
- - the attibute in the HTML elementattributeValue
- - the value of attibute in the HTML element
public IHTMLElement getIHTMLElement(String htmlTag, String attributeName, String attributeValue)
htmlTag
- - The HTML tag to get back.attributeName
- - the attibute in the HTML elementattributeValue
- - the value of attibute in the HTML element
public IHTMLElement getIHTMLElement(ElementContainer container, String htmlTag, String[] attributeNames, String[] attributeValues)
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 elementattributeValues
- - a list of values of attibutes in the same order as the names
public IHTMLElement getIHTMLElement(String htmlTag, String[] attributeNames, String[] attributeValues)
htmlTag
- - The HTML tag to get back.attributeNames
- - a list of attibutes in the HTML elementattributeValues
- - a list of values of attibutes in the same order as the names
public List getIHTMLElements(ElementContainer container, String htmlTag, String attributeName, String attributeValue)
container
- - The ElementContainer to use to get the attributes out of.htmlTag
- - The HTML tag to get back.attributeName
- - the attibute in the HTML elementattributeValue
- - the value of attibute in the HTML element
public List getIHTMLElements(String htmlTag, String attributeName, String attributeValue)
htmlTag
- - The HTML tag to get back.attributeName
- - the attibute in the HTML elementattributeValue
- - the value of attibute in the HTML element
public List getIHTMLElements(ElementContainer container, String htmlTag, String[] attributeNames, String[] attributeValues)
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 elementattributeValues
- - a list of values of attibutes in the same order as the names
public List getIHTMLElements(String htmlTag, String[] attributeNames, String[] attributeValues)
htmlTag
- - The HTML tag to get back.attributeNames
- - a list of attibutes in the HTML elementattributeValues
- - a list of values of attibutes in the same order as the names
public IHTMLInputElement getInputFieldByName(String inputFieldName)
inputFieldName
- - The name of the input field that exists in the current working form
public IHTMLAnchorElement getLink(String text)
getLinkWith()
- Gets a link with the diplayed text
getLinkWithID()
- Gets a link with the id
attribute set.
getImageLinkWithAltText
- Gets a link with the alt attribute or alt text.
getLinkWithName()
- Gets a link with the name attribute set.
text
- - The link text or the link id or the alt text or the link name.
null
if no WebLink
is found.
todo order should be id, name, label, imageText.public IHTMLAnchorElement getLinkWith(String text)
text
- - The text contained by the link
public IHTMLAnchorElement getLinkWithHref(String href, String text)
text
- - The text contained by the link
public List getLinksWith(String text)
text
- - The text contained by the links
public IHTMLAnchorElement getLinkWithID(String id)
id
- - The id of the link
public IHTMLAnchorElement getLinkWithImageSrc(String src)
src
- - The part of the src attribute of the img contained by the link
public IHTMLAnchorElement getImageLinkWithAltText(String text)
text
- - The alt text of the img contained by the link
public IHTMLAnchorElement getLinkWithName(String name)
name
- - The name of the link to find
public IHTMLInputElement getPasswordField(String passwordFieldName)
passwordFieldName
- - the name of the password field
RuntimeException
- if the field does not exist in the form.public IHTMLInputElement getRadioButton(String radioButtonName, String value)
radioButtonName
- - the name of the radio buttonvalue
- - the value to set the radio button to.
public IHTMLSelectElement getSelectField(String selectFieldName)
selectFieldName
selectFieldName
- - the name of the select field
selectFieldName
.public IHTMLOptionElement getSelectedOptionField(String selectFieldName)
selectFieldName
selectFieldName
- - the name of the select field
public IHTMLInputElement getSubmit(String name)
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.
public IHTMLInputElement getSubmit(String type, String value)
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)
RuntimeException
- if the field does not exist in the form.
todo introduce constants for supported types.public IHTMLInputElement getSubmitButtonWithName(String buttonName)
buttonName
- - the name of the submit button
buttonName
RuntimeException
- if the desired submit button isn't found in the working form.public IHTMLInputElement getSubmitButtonWithNameAndValue(String buttonName, String value)
buttonName
- - the name of the submit buttonvalue
- - the value attribute of the button
buttonName
and value
.
RuntimeException
- if the desired submit button isn't found in the working form.public IHTMLInputElement getSubmitButtonWithValue(String value)
value
- - the value attribute of the button
buttonName
and value
.
RuntimeException
- if the desired submit button isn't found in the working form.public IHTMLTextAreaElement getTextArea(String fieldName)
fieldName
- - the name of the text area
RuntimeException
- if the field does not exist in the form.public IHTMLInputElement getTextField(String fieldName)
fieldName
- - the name of the text field
RuntimeException
- if the field does not exist in the form.public IHTMLFormElement getWorkingForm()
getWorkingForm
in interface DocumentDelegate
public boolean isTextInPage(String text)
text
- - the expected text
public void navigate(String url, String username, String password)
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.public void navigate(String url)
url
- - The fully qualified URL ( e.g. http://www.google.com )public IHTMLInputElement setCheckbox(String checkboxFieldName, boolean checked)
checkboxFieldName
- - the name of the checkboxchecked
- - will check box if set to true, will uncheck box if set to false;public IHTMLInputElement setCheckboxWithNameAndValue(String checkboxFieldName, String checkboxValue, boolean checked)
checkboxFieldName
- - the name of the checkboxcheckboxValue
- - the value of the checkboxchecked
- - will check box if set to true, will uncheck box if set to false;public IHTMLInputElement setHiddenFieldValue(String hiddenFieldName, String value)
hiddenFieldName
to the value desired,
value
hiddenFieldName
- the name of the hidden field.value
- the value to be setpublic IHTMLSelectElement setSelectFieldOptionIndex(String selectFieldName, int index)
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.public IHTMLSelectElement setSelectFieldOptionIndexes(String selectFieldName, int[] indexes)
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.public IHTMLSelectElement setSelectFieldOptionText(String selectFieldName, String displayedText)
selectFieldName
- - the name of the select fielddisplayedText
- - the displayed text in the drop-downpublic IHTMLSelectElement setSelectFieldOptionTextValues(String selectFieldName, List displayedTextValues)
selectFieldName
- - the name of the select fielddisplayedTextValues
- - A list of the displayed text in the drop-downpublic IHTMLSelectElement setSelectFieldOptionValue(String selectFieldName, String value)
selectFieldName
- - the name of the select fieldvalue
- - the value to set the select field to.public IHTMLSelectElement setSelectFieldOptionValues(String selectFieldName, List values)
selectFieldName
- - the name of the select fieldvalues
- - the values to set the select field to.public IHTMLInputElement setPasswordFieldValue(String passwordFieldName, String value)
passwordFieldName
to the value desired, value
passwordFieldName
- - the name of the field value.value
- - the value to be setpublic IHTMLInputElement setRadioButtonValue(String radioButtonName, String value)
radioButtonName
- - the name of the radio buttonvalue
- - the value to set the radio button to.public IHTMLTextAreaElement setTextAreaValue(String textAreaName, String value)
textFieldName
to the value desired,
value
textAreaName
- the name of the input field.value
- the value to be setpublic IHTMLInputElement setTextFieldValue(String textFieldName, String value)
textFieldName
to the value desired,
value
This method follows the maxlength HTML attribute, by truncating the value to the maxlength
before setting the value.
textFieldName
- the name of the input field.value
- the value to be setpublic IHTMLInputElement setTextFieldValue(String textFieldName, String value, boolean enforceMaxLength)
textFieldName
to the value desired,
value
This method follows the maxlength HTML attribute, by truncating the value to the maxlength
before setting the value.
textFieldName
- the name of the input field.value
- the value to be setenforceMaxLength
- Set to false to not truncate the value to the maxlength of the text fieldpublic void setWorkingFormById(String id)
id
- = the id of the form (id attribute in the form element)public void setWorkingFormByIndex(int index)
index
- = the index of the form.public void setWorkingFormByName(String name)
name
- = the name of the form (name attribute in the form element)public void setWorkingForm(String formIdNameOrIndex)
setWorkingFormById(java.lang.String)
setWorkingFormByName(java.lang.String)
setWorkingFormByIndex(int)
formIdNameOrIndex
- = the id, name or index of the formpublic void setWorkingForm(IHTMLFormElement form)
form
- The IHTMLFormElement to set the working for topublic void submitWorkingForm()
public void pluginTearDown()
pluginTearDown
in class FunctionTag
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |