cookiemanager class : SetCookie(cookie) method
Description
Set a cookie.
Syntax
instance.SetCookie(cookie coo)
Arguments
| Class | Name | Description |
| cookie | coo | A cookie to be registered. |
Return value
None.
Sample code
| 1: | browser mainBrowser; |
| 2: | cookiemanager cm; |
| 3: | list{cookie} coos = cm.GetCookies(mainBrowser.Url); // All cookies in the current URL. |
| 4: | cookie firstChild = coos[0]; |
| 5: | firstChild.Value = "new_value"; |
| 6: | cm.SetCookie(firstChild); |
Notes
If the argument cookie already exists, it will be overwritten. It will be registered as a new cookie if not.
Links for reference
None.


