Conversation
|
Preview URLs (1 page) Flaws (7) Found an unexpected or unresolvable flaw? Please report it here. URL:
(comment last updated: 2026-04-08 19:36:31) |
37103c9 to
2faeee7
Compare
files/en-us/web/webdriver/reference/classic/commands/getelementattribute/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/webdriver/reference/classic/commands/getelementattribute/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Updates the MDN WebDriver “Get Element Attribute” command documentation to remove an unrealistic placeholder and replace it with a more accurate, spec-aligned description of return values.
Changes:
- Rewrites the introductory description for “Get Element Attribute” to describe returned values (including boolean attributes and
nullfor absent attributes).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
|
|
||
| The _Get Element Attribute_ [command](/en-US/docs/Web/WebDriver/Reference/Command) of the [WebDriver](/en-US/docs/Web/WebDriver) API returns the attribute of the referenced [web element](/en-US/docs/Web/WebDriver/Reference/WebElement). If for example the element is an {{HTMLElement("img")}}, the returned attribute is `"//TODO"`, which is equivalent to calling {{domxref("Element.getAttribute")}} on the element. For XML/XHTML documents it may be cased differently. | ||
| The _Get Element Attribute_ [command](/en-US/docs/Web/WebDriver/Reference/Command) of the [WebDriver](/en-US/docs/Web/WebDriver) API returns the value associated with the attribute of the given name of the referenced [web element](/en-US/docs/Web/WebDriver/Reference/WebElement). For boolean attributes, the associated value is `"true"` if present. Absent attributes return `null`. It is equivalent to calling {{domxref("Element.getAttribute()")}} on the element in JavaScript. |
There was a problem hiding this comment.
PR title/description mention replacing a "//TODO" placeholder with a realistic "src" example and normalizing Windows path separators in front-matter error messages, but this change updates the intro text without adding a "src" example, and no front-matter error-path normalization is reflected here. Please either (a) update the PR title/description to match the actual scope, or (b) include the missing "src" example and the Windows path-separator normalization change in this PR.
Replaces a leftover //TODO placeholder with a realistic "src" example in Get Element Attribute docs, and normalizes path separators in front-matter error messages on Windows. All tests pass locally.