Skip to content

Commit dab4a68

Browse files
aaltatpekkaklarck
authored andcommitted
Documentation updates
1 parent a7cbc7e commit dab4a68

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/SeleniumLibrary/keywords/cookie.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def get_cookie(self, name):
7070
| full_info | All the above attributes joined as string |
7171
7272
If no cookie is found with ``name``, this keyword fails.
73+
74+
New in SeleniumLibrary 3.0
7375
"""
7476
cookie = self.browser.get_cookie(name)
7577
if cookie:
@@ -87,8 +89,16 @@ def add_cookie(self, name, value, path=None, domain=None, secure=None,
8789
8890
``name`` and ``value`` are required, ``path``, ``domain``, ``secure``
8991
and ``expiry`` are optional. Expiry supports the same formats as
90-
the DateTime library and is converted to EPOCH which is supported
91-
by the Selenium.
92+
the [http://robotframework.org/robotframework/latest/libraries/DateTime.html|DateTime]
93+
library and is converted to EPOCH timestamp which is supported by the
94+
Selenium.
95+
96+
Prior SeleniumLibry 3.0 setting the expiry did not work.
97+
98+
Example:
99+
| Add Cookie | foo | bar | | # Adds cookie with name foo and value bar |
100+
| Add Cookie | foo | bar | domain=example.com | # Adds cookie with example.com domain defined |
101+
| Add Cookie | foo | bar | expiry=2027-09-28 16:21:35 | # Adds cookie with expiry time defined |
92102
"""
93103
new_cookie = {'name': name, 'value': value}
94104
if is_truthy(path):

0 commit comments

Comments
 (0)