Cookies are added to the phantom object not the page object.

gh-pages
Samyoul 2013-12-16 12:05:30 +00:00 committed by Ariya Hidayat
parent 8d490b1838
commit 4ae02afd8a
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ Add a Cookie to the page. If the domains do not match, the Cookie will be ignore
var webPage = require('webpage');
var page = webPage.create();
page.addCookie({
phantom.addCookie({
'name' : 'Valid-Cookie-Name', /* required property */
'value' : 'Valid-Cookie-Value', /* required property */
'domain' : 'localhost', /* required property */