Skip to content

Commit f683dd2

Browse files
jordan-macejimevans
authored andcommitted
Fixes binding spec compliance for ErrorResponse
Signed-off-by: Jim Evans <[email protected]>
1 parent c543c22 commit f683dd2

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

dotnet/src/webdriver/Remote/ErrorResponse.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="ErrorResponse.cs" company="WebDriver Committers">
1+
// <copyright file="ErrorResponse.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -68,9 +68,19 @@ public ErrorResponse(Dictionary<string, object> responseValue)
6868
this.className = responseValue["class"].ToString();
6969
}
7070

71-
if (responseValue.ContainsKey("stackTrace"))
71+
if (responseValue.ContainsKey("stackTrace") || responseValue.ContainsKey("stacktrace"))
7272
{
73-
object[] stackTraceArray = responseValue["stackTrace"] as object[];
73+
object[] stackTraceArray = null;
74+
75+
if (responseValue.ContainsKey("stackTrace"))
76+
{
77+
stackTraceArray = responseValue["stackTrace"] as object[];
78+
}
79+
else if (responseValue.ContainsKey("stacktrace"))
80+
{
81+
stackTraceArray = responseValue["stacktrace"] as object[];
82+
}
83+
7484
if (stackTraceArray != null)
7585
{
7686
List<StackTraceElement> stackTraceList = new List<StackTraceElement>();

0 commit comments

Comments
 (0)