tryolabs/requestium

Empty cookies <RequestsCookieJar[]>

oshabal opened this issue · 1 comments

Hi there,
Just testing requestium
`from requestium import Session

url = "https://{sign_in_endpoint}"
login = "xxx"
password = "xxx"

s = Session("./chromedriver", browser="chrome", default_timeout=15)
s.post(url, data={"login": login, "password": password})
print(response.status_code) #Ensure that POST was successful - OK
print(response.text) #Ensure that POST body was correct (Json with user data in my case) - OK
print(s.cookies) # <- Here I'm trying to figure out what is in the session - <RequestsCookieJar[]>
s.transfer_session_cookies_to_driver()
s.driver.get({resource homepage}) #Here I'm expecting logged in user on respected page`

No errors while running

Looks like I'm missing smth obvious related to cookies management/transfer here?

RTFM =/. Closed
cookie = {"domain": "www.site.com",
"secure": false,
"value": "sd2451dgd13",
"expiry": 1516824855.759154,
"path": "/",
"httpOnly": true,
"name": "sessionid"}
s.driver.ensure_add_cookie(cookie, override_domain='')