MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / Select

Method Select

java/src/org/openqa/selenium/support/ui/Select.java:43–56  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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() {

Calls 3

getTagNameMethod · 0.65
getDomAttributeMethod · 0.65
equalsMethod · 0.45