diff --git a/remote.go b/remote.go index 6320ec9..0fb66e6 100644 --- a/remote.go +++ b/remote.go @@ -11,6 +11,7 @@ import ( "errors" "fmt" "io/ioutil" + "math" "mime" "net/http" "net/url" @@ -1027,6 +1028,9 @@ func (wd *remoteWD) GetCookies() ([]Cookie, error) { } func (wd *remoteWD) AddCookie(cookie *Cookie) error { + if cookie.Expiry == 0 { + cookie.Expiry = math.MaxUint32 + } return wd.voidCommand("/session/%s/cookie", map[string]*Cookie{ "cookie": cookie, })