File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -528,8 +528,6 @@ public virtual ISearchContext GetShadowRoot()
528528 return shadowRoot ;
529529 }
530530
531- #nullable restore
532-
533531 /// <summary>
534532 /// Gets the value of a CSS property of this element.
535533 /// </summary>
@@ -549,10 +547,13 @@ public virtual string GetCssValue(string propertyName)
549547
550548 Response commandResponse = this . Execute ( DriverCommand . GetElementValueOfCssProperty , parameters ) ;
551549
552- return commandResponse . Value . ToString ( ) ;
553- }
550+ if ( commandResponse . Value is null )
551+ {
552+ throw new WebDriverException ( "GetElementValueOfCssProperty command returned a successful result, but contained no data" ) ;
553+ }
554554
555- #nullable enable
555+ return commandResponse . Value . ToString ( ) ! ;
556+ }
556557
557558 /// <summary>
558559 /// Gets a <see cref="Screenshot"/> object representing the image of this element on the screen.
You can’t perform that action at this time.
0 commit comments