MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / getInputByValue

Method getInputByValue

src/main/java/org/htmlunit/html/HtmlForm.java:954–961  ·  view source on GitHub ↗

Returns the first input in this form with the specified value. @param value the value to search for @param the input type @return the first input in this form with the specified value @throws ElementNotFoundException if this form does not contain any inputs with the specified value

(final String value)

Source from the content-addressed store, hash-verified

952 * @throws ElementNotFoundException if this form does not contain any inputs with the specified value
953 */
954 @SuppressWarnings("unchecked")
955 public <I extends HtmlInput> I getInputByValue(final String value) throws ElementNotFoundException {
956 final List<HtmlInput> list = getInputsByValue(value);
957 if (list.isEmpty()) {
958 throw new ElementNotFoundException(HtmlInput.TAG_NAME, VALUE_ATTRIBUTE, value);
959 }
960 return (I) list.get(0);
961 }
962
963 /**
964 * Returns all the inputs in this form with the specified value.

Callers 7

mutipleMethod · 0.95
webkitdirectoryMethod · 0.95
getInputByValueMethod · 0.95

Calls 3

getInputsByValueMethod · 0.95
isEmptyMethod · 0.65
getMethod · 0.45

Tested by 7

mutipleMethod · 0.76
webkitdirectoryMethod · 0.76
getInputByValueMethod · 0.76