Gets the value of a CSS property of this element. The name of the CSS property to get the value of. The value of the specified CSS property. The value returned by the method is likely to be unpredictable in a cross-browser environment. Color values should be returned as hex strings. For ex
(string propertyName)
| 528 | /// return "#008000" for its value.</remarks> |
| 529 | /// <exception cref="StaleElementReferenceException">Thrown when the target element is no longer valid in the document DOM.</exception> |
| 530 | public virtual string GetCssValue(string propertyName) |
| 531 | { |
| 532 | Dictionary<string, object> parameters = new Dictionary<string, object>(); |
| 533 | parameters.Add("id", this.Id); |
| 534 | parameters.Add("name", propertyName); |
| 535 | |
| 536 | Response commandResponse = this.Execute(DriverCommand.GetElementValueOfCssProperty, parameters); |
| 537 | |
| 538 | commandResponse.EnsureValueIsNotNull(); |
| 539 | return commandResponse.Value.ToString()!; |
| 540 | } |
| 541 | |
| 542 | /// <summary> |
| 543 | /// Gets a <see cref="Screenshot"/> object representing the image of this element on the screen. |
nothing calls this directly
no test coverage detected