public class FormParameterUtil extends Object
| Constructor and Description |
|---|
FormParameterUtil(net.sourceforge.jwebunit.WebTester tester,
String formIdentifierOrName,
String submitButtonName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOptionToHtmlSelect(String select,
String[] value)
allows you to add options to an existing select HTML element
|
void |
replaceOptionsinHtmlSelect(String select,
String[] value)
allows you to replace the options in an existing select HTML element
|
void |
setFormElement(String formElementName,
String value)
allows you to replace the options in an existing select HTML element
|
void |
setParameters(Map<String,String[]> parameters)
allows you to set the value of any parameter in the request
|
Node |
submitForm() |
public FormParameterUtil(net.sourceforge.jwebunit.WebTester tester,
String formIdentifierOrName,
String submitButtonName)
tester - the currently executing WebTesterformIdentifierOrName - either the id or the name of the form you want to modifysubmitButtonName - the name of the submit button, if null then the default button is usedpublic void addOptionToHtmlSelect(String select, String[] value)
select - the name of the select to which to add an optionvalue - a string array containing the option values you want to submitpublic void replaceOptionsinHtmlSelect(String select, String[] value)
select - the name of the select to which to repalce all optionsvalue - a string array containing the option values you want to submitpublic void setFormElement(String formElementName, String value)
formElementName - the name of the formElementvalue - a string containing the value you want to submitpublic void setParameters(Map<String,String[]> parameters)
parameters - A map containing the names and values of the parmeters to be submitedpublic Node submitForm()
DomNodeCopier is used to return a shallow copy of the DocumentCopyright © 2002-2024 Atlassian. All Rights Reserved.