5

By my research so far, IE selenium webdriver (for IE10 or 11) is not able to retrieve httponly cookies.

So code like this can return a full set of cookies including those set to httponly if I am using Chrome or FF driver

self.driver.get_cookies()

However for the IE driver, thehttponly cookies will be missing from the result

I just want to confirm it is the behaviour as of now, and if there is any workaround other than unsetting the httponly flag on the server side.

P.S. Unable to create new 'IE' tag so tagging this question with ie9

1
  • 1
    Can you get the full list and parse out the http from https? Optionally you can get the original get_cookies() functions from selenium and write a custom one instead. Either way I'd think you would have to get the full set and then parse out the ones that don't match your target.
    – mutt
    Aug 26, 2016 at 1:54

1 Answer 1

1
  • This is one of the open issue

  • Work around is :

    1. Turn off the HTTP-only flag when running my site in testing mode
    2. I use Django for my server so I had to create a special test_settings.py file with SESSION_COOKIE_HTTPONLY = False in it

I borrow answer from here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.