Allow specifying path for storing cookies
In current implementation of ghostdriver there is no way to load cookies when starting a session. Passing --cookies-file to phantomjs doesn't work because ghostdriver's session.js creates a new cookie jar without any argument, which doesn't allow us to load or save cookies.
I have added "phantomjs.cookies.path" capability that lets you specify the path for the cookie jar.
Thanks for the feedback. I've fixed the behavior when the path is not set, and added the test case.
@kasatani the test ghostdriver.CookieStoreTest#shouldLoadCookies does not pass when i run it.
to run the test:
cd <ghostdriver project root>/test/java
./gradlew test -Dtest.single=CookieStoreTest --debug
you may need to modify phantomjs_exec_path in <project root>/test/config.ini to phantomjs on your system.
CookieStoreTest passes in my environment. Which version of phantomjs should I use for the testing? I'm using the released phantomjs-2.1.1 on macOS Sierra.
Which version of phantomjs should I use for the testing?
i normally use a patched version of 2.1.1 but i'm also seeing the error in the official 2.1.1 release. i run the tests on ubuntu 17.
i should be able to take a look on a mac sometime next week.