Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with phantomjs 2 and cookies #4

Open
nathanboktae opened this issue May 14, 2015 · 2 comments
Open

issues with phantomjs 2 and cookies #4

nathanboktae opened this issue May 14, 2015 · 2 comments

Comments

@nathanboktae
Copy link
Owner

Before we had a test that was adding a cookie without a doman, loading the tests on the file: protocol, and it saw the cookie there. Now in phantomjs2, that cookie fails to add because it has no domain. Also, that test didn't make much sense in the real world. Cookies always are tied to a domain, but file: has always been special in the same origin policy, not really having a domain, so the test wasn't very accurate to begin with.

In my manual tests, I wasn't able to add a cookie before loading a page with a domain at all.... :/

Help wanted with this one.

@MaestroJurko
Copy link

How does someone add cookie per page, because in documentation I only see addCookie, and it adds it to phantom?

@nathanboktae
Copy link
Owner Author

Phantomjs 1 didn't support this so mocha-phantomjs didn't support it explicitly. However if you use a before hook, you could use the API to set the cookies as you wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants