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

Method GetDomAttribute

dotnet/src/webdriver/WebElement.cs:465–474  ·  view source on GitHub ↗

Gets the value of a declared HTML attribute of this element. The name of the HTML attribute to get the value of. The HTML attribute's current value. Returns a if the value is not set or the declared attribute does not exist. Thrown when the target elem

(string attributeName)

Source from the content-addressed store, hash-verified

463 /// method or the <see cref="GetDomProperty(string)"/> method.
464 /// </remarks>
465 public virtual string? GetDomAttribute(string attributeName)
466 {
467 Dictionary<string, object> parameters = new Dictionary<string, object>();
468 parameters.Add("id", this.Id);
469 parameters.Add("name", attributeName);
470
471 Response commandResponse = this.Execute(DriverCommand.GetElementAttribute, parameters);
472
473 return commandResponse.Value?.ToString();
474 }
475
476 /// <summary>
477 /// Gets the value of a JavaScript property of this element.

Callers

nothing calls this directly

Calls 2

ExecuteMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected