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)
| 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. |