Package org.htmlunit.html
Interface FormFieldWithNameHistory
-
- All Known Implementing Classes:
HtmlButton
,HtmlButtonInput
,HtmlCheckBoxInput
,HtmlColorInput
,HtmlDateInput
,HtmlDateTimeLocalInput
,HtmlEmailInput
,HtmlFileInput
,HtmlHiddenInput
,HtmlImageInput
,HtmlInput
,HtmlMonthInput
,HtmlNumberInput
,HtmlPasswordInput
,HtmlRadioButtonInput
,HtmlRangeInput
,HtmlResetInput
,HtmlSearchInput
,HtmlSelect
,HtmlSelectableTextInput
,HtmlSubmitInput
,HtmlTelInput
,HtmlTextArea
,HtmlTextInput
,HtmlTimeInput
,HtmlUrlInput
,HtmlWeekInput
public interface FormFieldWithNameHistory
Interface for form fields where the original field name still matters even once it has been changed.Example:
With
<input name="foo"/>
following script will work
theForm.foo.name = 'newName';
theForm.foo.value = 'some value';
Depending on the simulated browser the form field is reachable only through its original name or through all the names it has had.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<java.lang.String>
getNewNames()
Get all the names this field got after the original one.java.lang.String
getOriginalName()
Gets the first value of thename
attribute of this field before any change.
-
-
-
Method Detail
-
getOriginalName
java.lang.String getOriginalName()
Gets the first value of thename
attribute of this field before any change.- Returns:
- the original name (which is the same as the current one when no change has been made)
-
getNewNames
java.util.Collection<java.lang.String> getNewNames()
Get all the names this field got after the original one.- Returns:
- an empty collection if the name attribute has never been changed.
-
-