WebPagetest Forums
How to Set Cookie via Script - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: How to Set Cookie via Script (/showthread.php?tid=14180)



How to Set Cookie via Script - badarinathvm - 01-27-2016 02:14 PM

Hello

I am using below script , unable to set cookie. Can you point mistake in below script ?


setCookie www1.XXX.com herokukey='{EXPERIMENT:[1063]}'
navigate http://www1.XXX.com/shop/product/kitchenaid-ksm150ps-artisan-5-qt.-stand-mixer?ID=77589
setViewportSize 1280 1024


RE: How to Set Cookie via Script - rviscomi - 02-27-2016 08:22 AM

(01-27-2016 02:14 PM)badarinathvm Wrote:  Hello

I am using below script , unable to set cookie. Can you point mistake in below script ?


setCookie www1.XXX.com herokukey='{EXPERIMENT:[1063]}'
navigate http://www1.XXX.com/shop/product/kitchenaid-ksm150ps-artisan-5-qt.-stand-mixer?ID=77589
setViewportSize 1280 1024

Try using this format:

Code:
setCookie http://www.ebay.com session=286755fad04869ca523320acce0dc6a4

Explicitly specify the protocol (http://) of the host. Also, the value of the cookie looks like JSON output or something, is that intentional? In any case, you can omit the quotes.