MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / getAttribute

Method getAttribute

src/main/java/org/htmlunit/html/DomElement.java:427–434  ·  view source on GitHub ↗

Returns the value of the attribute specified by name or an empty string. If the result is an empty string then it will be either #ATTRIBUTE_NOT_DEFINED if the attribute wasn't specified or #ATTRIBUTE_VALUE_EMPTY if the attribute was specified, but it was empty. @param attributeName

(final String attributeName)

Source from the content-addressed store, hash-verified

425 * @return the value of the attribute or {@link #ATTRIBUTE_NOT_DEFINED} or {@link #ATTRIBUTE_VALUE_EMPTY}
426 */
427 @Override
428 public String getAttribute(final String attributeName) {
429 final DomAttr attr = attributes_.get(attributeName);
430 if (attr != null) {
431 return attr.getNodeValue();
432 }
433 return ATTRIBUTE_NOT_DEFINED;
434 }
435
436 /**
437 * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>

Callers 15

detachFromParentMethod · 0.95
getAttributeNSMethod · 0.95
getHttpEquivAttributeMethod · 0.45
setCheckedForPageMethod · 0.45
setAttributeNSMethod · 0.45
getTypeAttributeMethod · 0.45
getAcceptAttributeMethod · 0.45
setAttributeNSMethod · 0.45
setAttributeNodeMethod · 0.45

Calls 2

getNodeValueMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected