Skip to content

Commit

Permalink
Merge pull request #11 from go-auxiliaries/fix_add_cookie
Browse files Browse the repository at this point in the history
Fix add cookie issue
  • Loading branch information
dkropachev authored Apr 14, 2023
2 parents 3aa67c2 + 07dd60a commit aec3b87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"io/ioutil"
"math"
"mime"
"net/http"
"net/url"
Expand Down Expand Up @@ -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,
})
Expand Down

0 comments on commit aec3b87

Please sign in to comment.