Skip to content

Commit c55eb00

Browse files
committed
improve error message
1 parent bca2dc8 commit c55eb00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet/src/webdriver/WebElement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public virtual string TagName
8181

8282
if (commandResponse.Value is null)
8383
{
84-
throw new WebDriverException($"GetElementTagName command was successful, but response was not an object: {commandResponse.Value}");
84+
throw new WebDriverException("GetElementTagName command returned a successful result, but contained no data");
8585
}
8686
return commandResponse.Value.ToString()!;
8787
}
@@ -103,7 +103,7 @@ public virtual string Text
103103

104104
if (commandResponse.Value is null)
105105
{
106-
throw new WebDriverException($"GetElementText command was successful, but response was not an object: {commandResponse.Value}");
106+
throw new WebDriverException("GetElementText command returned a successful result, but contained no data");
107107
}
108108

109109
return commandResponse.Value.ToString()!;

0 commit comments

Comments
 (0)