Createcookie

The create cookie command allows you to add new cookies to your Selenium session.

Required Attributes
nameValuePair
the name,value pair in the format 'name=value'
optionsString
options for the cookie. Currently supported options include 'path' and 'max_age'. the optionsString's format is "path=/path/, max_age=60". The order of options are irrelevant, the unit of the value of 'max_age' is second.
Usage Examples
Example #1
<selenium baseurl="http://www.yahoo.com" browser="*firefox">
   
<open url="/" />
   
<waitForPageToLoad timeout="30000" />
   
<createCookie nameValuePair="C=D" optionsString="path=/" />
   
<deleteCookie name="C=D" path="/" />
</selenium>