Skip to content

Commit b313712

Browse files
authored
Update javadoc for getCssValue() (#9346)
1 parent c854877 commit b313712

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

java/client/src/org/openqa/selenium/WebElement.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,12 @@ default String getAccessibleName() {
306306

307307
/**
308308
* Get the value of a given CSS property.
309-
* Color values should be returned as rgba strings, so,
310-
* for example if the "background-color" property is set as "green" in the
311-
* HTML source, the returned value will be "rgba(0, 255, 0, 1)".
309+
* Color values could be returned as rgba or rgb strings.
310+
* This depends on whether the browser omits the implicit opacity value or not.
311+
*
312+
* For example if the "background-color" property is set as "green" in the
313+
* HTML source, the returned value could be "rgba(0, 255, 0, 1)" if implicit opacity value is
314+
* preserved or "rgb(0, 255, 0)" if it is omitted.
312315
*
313316
* Note that shorthand CSS properties (e.g. background, font, border, border-top, margin,
314317
* margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned,

0 commit comments

Comments
 (0)