Skip to content

Set Cookie

Function Description

TIP

Set the cookie based on the specified cookie data, overwriting if an equivalent cookie exists

Set Cookie

Configuration Item Description

General

Command Input

  • URL Setting MethodInteger: The source of the Cookie URL setting value; you can choose to enter manually. If a webpage object is selected, the webpage URL will be used automatically.

  • Webpage ObjectTBrowser: Enter a webpage object that has been obtained or created by the 'Open Webpage' function.

  • Browser TypeInteger: Set the type of browser for the cookie.

  • Cookie URLstring: The URL associated with the cookie setting, which affects the default Domain and Path of the created cookie.

  • Cookie Namestring: If the Cookie name is ignored, it will be empty.

  • Cookie Valuestring: If the Cookie value is ignored, it will be empty.

  • Cookie Domainstring: The domain part of the URL by default, ignored to make the cookie host-only.

  • Cookie Pathstring: The path part of the URL by default, ignored to leave it blank.

  • Mark as HttpOnlyBoolean: Set whether the cookie is marked as HttpOnly, default is false.

  • Mark as SecureBoolean: Set whether the cookie is marked as Secure, default is false.

  • Set as Session CookieBoolean: Default is to set a session cookie, uncheck to set a persistent cookie.

  • Cookie Expiration (seconds)Integer: Persistent cookies need to set an expiration time (the time interval from when the cookie takes effect to when it expires, in seconds), default is 100 seconds.

Command Output

No output for the current command

Advanced

  • Delay Before (ms)Integer: The waiting time before instruction execution

Error Handling

  • Print Error LogsBoolean: Whether to print error logs to the "Logs" panel when the command fails. Default is checked.

  • Handling MethodInteger:

    • Terminate Process: If the command fails, terminate the process.

    • Ignore Exception and Continue Execution: If the command fails, ignore the exception and continue the process.

    • Retry This Command: If the command fails, retry the command a specified number of times with a specified interval between retries.

Usage Example

Process logic description:

Common Errors and Handling

None

Frequently Asked Questions

None