Constructor. A check is made that the given element is, indeed, a SELECT tag. If it is not, then an UnexpectedTagNameException is thrown. @param element SELECT element to wrap @throws UnexpectedTagNameException when element is not a SELECT
(WebElement element)
| 41 | * @throws UnexpectedTagNameException when element is not a SELECT |
| 42 | */ |
| 43 | public Select(WebElement element) { |
| 44 | String tagName = element.getTagName(); |
| 45 | |
| 46 | if (!"select".equalsIgnoreCase(tagName)) { |
| 47 | throw new UnexpectedTagNameException("select", tagName); |
| 48 | } |
| 49 | |
| 50 | this.element = element; |
| 51 | |
| 52 | String value = element.getDomAttribute("multiple"); |
| 53 | |
| 54 | // The atoms normalize the returned value, but check for "false" |
| 55 | isMulti = (value != null && !"false".equals(value)); |
| 56 | } |
| 57 | |
| 58 | @Override |
| 59 | public WebElement getWrappedElement() { |