This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27733 - [WebDriver Spec]: attr.specified shouldn't be checked by getElementAttribute
Summary: [WebDriver Spec]: attr.specified shouldn't be checked by getElementAttribute
Status: RESOLVED WONTFIX
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2015-01-03 13:00 UTC by Andrey Botalov
Modified: 2015-10-26 05:21 UTC (History)
3 users (show)

See Also:


Attachments

Description Andrey Botalov 2015-01-03 13:00:26 UTC
According to the [DOM spec](https://dom.spec.whatwg.org/#attr) attr.specified always returns `true`.

Therefore I think it's not necessary to use `getAttributeNode`:

> If result is null or undefined, or if it is an object, set the value of result to be the value of the AttributeNode obtained by calling getAttributeNode on element iff that AttributeNode is specified. That is, result is the equivalent of executing the following Ecmascript: var attr = element.getAttribute(name); var result = (attr && attr.specified) ? attr.value : null;

change into:

> If result is null or undefined, or if it is an object, set the value of result
 to be the value obtained by calling getAttribute(name) on element.

Also `name` may be in e.g. upper case at that step of the algorithm. I think it would be better to convert it to lower case at the first step of the algorithm and don't say that it should "match insensitively"