cookiemanager class : CopyCookie(cookie) method

Description

Creates a cookie with the same parameters as the argument.

Syntax

instance.CopyCookie(cookie coo)

Arguments

ClassNameDescription
cookiecooOriginal cookie.

Return value

ClassDescription
cookieCopied cookie.

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:

cookie copyCoo = cm.CopyCookie(firstChild);

Notes

You must explicitly save it to reflect the cookie you create.

Links for reference

None.

Copyright © Cooker All rights reserved.