From f683dd2ade4322b3fb36a7a08cf028a20679b5f2 Mon Sep 17 00:00:00 2001 From: Jordan Mace <1805887+jordanm-mel@users.noreply.github.com> Date: Mon, 17 Feb 2020 16:38:00 +1100 Subject: [PATCH] Fixes binding spec compliance for ErrorResponse Signed-off-by: Jim Evans --- dotnet/src/webdriver/Remote/ErrorResponse.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dotnet/src/webdriver/Remote/ErrorResponse.cs b/dotnet/src/webdriver/Remote/ErrorResponse.cs index 03919b6df5edc..3b8ccef127cfb 100644 --- a/dotnet/src/webdriver/Remote/ErrorResponse.cs +++ b/dotnet/src/webdriver/Remote/ErrorResponse.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -68,9 +68,19 @@ public ErrorResponse(Dictionary responseValue) this.className = responseValue["class"].ToString(); } - if (responseValue.ContainsKey("stackTrace")) + if (responseValue.ContainsKey("stackTrace") || responseValue.ContainsKey("stacktrace")) { - object[] stackTraceArray = responseValue["stackTrace"] as object[]; + object[] stackTraceArray = null; + + if (responseValue.ContainsKey("stackTrace")) + { + stackTraceArray = responseValue["stackTrace"] as object[]; + } + else if (responseValue.ContainsKey("stacktrace")) + { + stackTraceArray = responseValue["stacktrace"] as object[]; + } + if (stackTraceArray != null) { List stackTraceList = new List();