From b9168efa9326e52519f81b4d014677166b902084 Mon Sep 17 00:00:00 2001 From: thebinary Date: Sat, 12 Mar 2022 01:40:02 +0545 Subject: [PATCH] fix: allow ommiting cookie fields when adding The webdrivers should be allowed to decide the defaults values if these fields are ommitted in the JSON request, rather than forcefully sending default values for these fields. --- selenium.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/selenium.go b/selenium.go index ecd8c91..62a8218 100644 --- a/selenium.go +++ b/selenium.go @@ -207,11 +207,11 @@ type Size struct { type Cookie struct { Name string `json:"name"` Value string `json:"value"` - Path string `json:"path"` - Domain string `json:"domain"` - Secure bool `json:"secure"` - Expiry uint `json:"expiry"` - HTTPOnly bool `json:"httpOnly"` + Path string `json:"path,omitempty"` + Domain string `json:"domain,omitempty"` + Secure bool `json:"secure,omitempty"` + Expiry uint `json:"expiry,omitempty"` + HTTPOnly bool `json:"httpOnly,omitempty"` SameSite SameSite `json:"sameSite,omitempty"` }