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

Method getAttribute

javascript/selenium-webdriver/lib/webdriver.js:2978–2980  ·  view source on GitHub ↗

* Retrieves the current value of the given attribute of this element. * Will return the current value, even if it has been modified after the page * has been loaded. More exactly, this method will return the value * of the given attribute, unless that attribute is not present, in which case

(attributeName)

Source from the content-addressed store, hash-verified

2976 * either a string or null.
2977 */
2978 getAttribute(attributeName) {
2979 return this.execute_(new command.Command(command.Name.GET_ELEMENT_ATTRIBUTE).setParameter('name', attributeName))
2980 }
2981
2982 /**
2983 * Get the value of the given attribute of the element.

Callers

nothing calls this directly

Calls 2

execute_Method · 0.95
setParameterMethod · 0.80

Tested by

no test coverage detected