WARNING 1: You can only run this test off of a "real" webserver (i.e. over http); you can't run this test directly off of the file system.
WARNING 2: This test requires your domain name to contain two dots. (Not really... just define blah.mydomain.org to be 127.0.0.1 in your hosts file.) For this reason, the test can't be run as part of a nightly suite.
Test Cookie |
||
storeEval | parseUrl(canonicalize(absolutify("html", selenium.browserbot.baseUrl))).host; | host |
echo | ${host} | |
assertExpression | ${host} | *.*.* |
storeEval | var host = parseUrl(canonicalize(absolutify("html", selenium.browserbot.baseUrl))).host; host.replace(/^[^\.]*/, ""); | domain |
echo | ${domain} | |
storeEval | parseUrl(canonicalize(absolutify("html", selenium.browserbot.baseUrl))).pathname; | base |
echo | ${base} | |
open | ${base}/path1/cookie1.html | |
deleteCookie | testCookieWithSameName | path=/ |
deleteCookie | addedCookieForPath1 | path=${base}/path1/ |
deleteCookie | domainCookie | domain=${domain}; path=/ |
assertCookie |
open | ${base}/path1/cookie1.html | |
createCookie | domainCookie=domain value | domain=${domain}; path=/ |
assertCookieByName | domainCookie | domain value |
deleteCookie | domainCookie | domain=${domain}; path=/ |
assertCookieNotPresent | domainCookie | |
assertCookie |