Skip to content

Commit 2c4f935

Browse files
granakjimevans
authored andcommitted
Null cookie value fix
Issue found during testing using Edge while cookie value was empty - interpreted as null. Getting string of null was failing. Signed-off-by: Jim Evans <james.h.evans.jr@gmail.com>
1 parent 6fe22c3 commit 2c4f935

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dotnet/src/webdriver/Cookie.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ public static Cookie FromDictionary(Dictionary<string, object> rawCookie)
222222
}
223223

224224
string name = rawCookie["name"].ToString();
225-
string value = rawCookie["value"].ToString();
225+
string value = string.Empty;
226+
if (rawCookie["value"] != null)
227+
{
228+
value = rawCookie["value"].ToString();
229+
}
226230

227231
string path = "/";
228232
if (rawCookie.ContainsKey("path") && rawCookie["path"] != null)

0 commit comments

Comments
 (0)