Gets the value of a JavaScript property of this element. The name of the JavaScript property to get the value of. The JavaScript property's current value. Returns a if the value is not set or the property does not exist. Thrown when the target element i
(string propertyName)
| 481 | /// value is not set or the property does not exist.</returns> |
| 482 | /// <exception cref="StaleElementReferenceException">Thrown when the target element is no longer valid in the document DOM.</exception> |
| 483 | public virtual string? GetDomProperty(string propertyName) |
| 484 | { |
| 485 | Dictionary<string, object> parameters = new Dictionary<string, object>(); |
| 486 | parameters.Add("id", this.Id); |
| 487 | parameters.Add("name", propertyName); |
| 488 | |
| 489 | Response commandResponse = this.Execute(DriverCommand.GetElementProperty, parameters); |
| 490 | |
| 491 | return commandResponse.Value?.ToString(); |
| 492 | } |
| 493 | |
| 494 | /// <summary> |
| 495 | /// Gets the representation of an element's shadow root for accessing the shadow DOM of a web component. |