hound
hound copied to clipboard
set_cookie with PhantomJS 2.1.*
I have just upgraded from PhantomJS 2.0.0 to 2.1.1 and tests which were successfully passing are now failing with the following error. Supposing I set a cookie as follows:
set_cookie(%{name: "auth_token", value: token})
The test fails with:
** (RuntimeError) Can only set Cookies for the current domain
stacktrace:
(hound) lib/hound/request_utils.ex:57: Hound.RequestUtils.handle_response/3
I have upgraded to the current master branch of Hound, but the issue persists.
I ran into this recently, seems to be a bug in the latest versions of phantomjs/ghostdriver:
- https://github.com/ariya/phantomjs/issues/14228
- https://github.com/detro/ghostdriver/issues/365
As you mentioned, I was able to successfully set cookies using phantomjs 2.0.0, but got the same error as you with the latest 2.1.x.
I was also able to successfully set cookies using the other drivers, chromedriver & selenium.