Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/WWW/Mechanize/PhantomJS/ghostdriver/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ ghostdriver.Session = function(desiredCapabilities) {
// decorate the new Window/Page
newPage = _decorateNewWindow(newPage);
// set session-specific CookieJar
newPage.cookieJar = _cookieJar;
// newPage.cookieJar = _cookieJar;
// store the Window/Page by WindowHandle
_windows[newPage.windowHandle] = newPage;
},
Expand Down Expand Up @@ -657,7 +657,7 @@ ghostdriver.Session = function(desiredCapabilities) {
// Decorate it with listeners and helpers
page = _decorateNewWindow(page);
// set session-specific CookieJar
page.cookieJar = _cookieJar;
// page.cookieJar = _cookieJar;
// Make the new Window, the Current Window
_currentWindowHandle = page.windowHandle;
// Store by WindowHandle
Expand Down Expand Up @@ -789,7 +789,7 @@ ghostdriver.Session = function(desiredCapabilities) {
}

// Release CookieJar resources
_cookieJar.close();
// _cookieJar.close();
},

_getLog = function (type) {
Expand Down
3 changes: 3 additions & 0 deletions t/99-cookie_file.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
document.cookie = "key=value";
</script>
12 changes: 12 additions & 0 deletions t/99-cookie_file.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!perl -w
use strict;
use Test::More tests => 1;
use File::Temp;
use WWW::Mechanize::PhantomJS;

my $tmp = File::Temp->new;
my $mech = WWW::Mechanize::PhantomJS->new(
cookie_file => $tmp->filename,
);
$mech->get_local('99-cookie_file.html');
ok -s $tmp->filename > 0, "cookie_file saved.";