-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Arg '--cookies-file' broken on 2.0 #13115
Comments
Hi, I encountered the same issue. By changing one line in the "phantom.cpp" file I got it working, but I'm not sure if this is the correct way to do it (or if it will break existing code). Change the the line in the Phantom::createCookieJar method from: to return new CookieJar(m_config.cookiesFile() != "" ? m_config.cookiesFile() : filePath,this); |
Are you sure? Because I don't see that line in |
I mean in this method: https://github.com/ariya/phantomjs/blob/master/src/phantom.cpp#L297 |
Yes, maybe manually modifying the source can fix the issue. But people behind PhantomJS need to fix that! |
I met the same problem. 1.9.8 does working! |
I have the same problem. |
+1, Does anybody can fix it? |
Perhaps there is a problem with Ghostdriver. Because the plain PhantomJS script works. |
This is at line 310 now. |
I'm running into some serious issues because of this, and I would've expected functionality like this to be much more visible, and problematic for a lot of users. Is there perhaps some workaround I'm not aware of? |
The "workaround" is to compile it yourself after fixing the code the way @yali25 suggests. Here's a wiki page with step by step instructions https://github.com/Yossi/agent-stats-utils/wiki/How-to-compile-phantomjs-for-yourself |
That "workaround" may be suitable for things that only use phantomjs locally, but it's certainly not for the acceptance tests of my open source project, which have to run on TravisCI as well as on the local machine of anyone who wants to develop the project. For anyone else who has similar needs, I have come up with a workaround the solves the problem if your environment requires phantomjs, but has no control over the version or compilation. I'm using Selenium WebDriver in my tests, to wrap phantomjs. I've written some wrapper methods that are called to get a Browser instance and to request pages; after a page is requested (before teardown), I use WebDriver's |
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
I was trying this simple code using 2.0:
The 'cookies.txt' file wasn't being created, tried many times, no lucky. Downgraded to 1.9.8 and bang, working 100%
The text was updated successfully, but these errors were encountered: