Legacy | Add cookie
-
Command: cookie
-
Subcommand: add
-
Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium
All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.
-
Supported OS: Android, iOS
Adds a specific cookie.
Description
Adds a cookie into the browser cache.
Parameters
Name | Value | Default | Description |
---|---|---|---|
deviceID* | The device for this command. | ||
name* | The name of the cookie. | ||
value* | The value of the cookie. | ||
path | The path that the cookie is visible to. If left blank, this will be set to / .
|
||
domain | The domain that the cookie is visible to. | ||
expiry | The cookie's expiration date. The expiry value is the date, in milliseconds (Epoch Time), according to the device date. For example: 1450948962293 | ||
secure |
secure (True) notSecure (False) |
False | Whether this cookie requires a secure connection. |
httpOnly |
httpOnly (True) notHttpOnly (False) |
False | Whether this cookie is a httpOnly cookie. |
* Mandatory
Request
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-12-07_08_30_54_151?operation=command&securityToken=<your_token>&command=cookie&subcommand=add¶m.deviceId=2ACB96B8¶m.name=myCook¶m.value=c4