get_cookie
The command to get the cookie with the given name.
Syntax
py.get_cookie(name: str) -> dictUsage
py.get_cookie("foo")
---or--- # "key" into the dictionary
val = py.get_cookie("foo")["value"]
---or--- # use the .get() function in dict
val = py.get_cookie("foo").get("value")Arguments
name (str)- The name of the cookie
Yields
Dict- The cookie as a dictionary. Cookie objects have the following properties:namevaluepathdomainhttpOnlysecureexpiry
Returns None if the cookie does not exist
Last updated