Open topic with navigation
Adds a cookie with specified add behavior.
int web_add_cookie_ex( const char *Cookie , [const char *Insert,][ const char *AllowEmptyDomain,] [ENDITEM, Cookie, [Insert,] [AllowEmptyDomain,] ] [ENDITEM...] LAST );
This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
The following argument(s) can be parameterized using standard parameterization: Cookie
The web_add_cookie_ex function adds a new cookie with the option to place the cookie at the beginning of the cookie table, and to allow an empty domain. If the name and path match an existing cookie, the existing cookie is overwritten with the new one. If the "expires" date has past, the cookie is deleted.
The set of arguments, Cookie, and optionially , Insert, and AllowEmptyDomain, define one cookie. More than one definition can be passed in a single call to web_add_cookie_ex. Separate sets of cookie definitions with ENDITEM. A call with more than one set is eqivalent to separate web_add_cookie_ex calls, each defining one cookie.
Although scripts handle cookies automatically, there may be cases when you need to manually control the cookies.
Note: Scripts do not use (access or modify) the cookies that are stored by your browser. Instead, each script uses the cookies that are sent to the Vuser by the server host at runtime. These cookies are maintained only temporarily while the script runs. The web–cookie functions (web_add_cookie, web_add_cookie_ex, web_remove_cookie, and web_cleanup_cookies) manipulate these temporary cookies only.
The intended use of web_add_cookie_ex is to add cookies usually stored in the browser, prior to starting the run.
This function is supported for all Web scripts.