webdriver.WebDriver.Options.prototype.addCookie = function( name, value, opt_path, opt_domain, opt_isSecure, opt_expiry) { // We do not allow '=' or ';' in the name. if (/[;=]/.test(name)) { throw Error('Invalid cookie name "' + name + '"'); } // We do not allow ';' in value. if (/;/.test(value)) { throw Error('Invalid cookie value "' + value + '"'); } var cookieString = name + '=' + value + (opt_