webdriver
webdriver copied to clipboard
Can't set cookies
Getting the following error from webdriver.Session.SetCookie() unknown error: name of cookie is missing or invalid:"undefined"
Using the following code:
for _, cookie := range session.Web.Jar.Cookies(url) {
log.Print(cookie.Name)
log.Print(webSession.SetCookie(webdriver.Cookie{
Name:cookie.Name,
Value:cookie.Value,
Path:cookie.Path,
Domain:cookie.Domain,
Secure:cookie.Secure,
Expiry:int(cookie.Expires.Unix()),
}))
}
Logging from cookie gives valid data. Going to have to use selenium for now :/.