Skip to content

Commit db12e58

Browse files
committed
Update future cookie a year out (into 2025)
As Chrome does not allow for cookie expiry to not go out past a year we need to update each September. This is the update for September 2024. Also left instruction on how to update so next year it is even easier.
1 parent b5986f4 commit db12e58

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

atest/acceptance/keywords/cookies.robot

+5-2
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,20 @@ Test Get Cookie Keyword Logging
114114
... domain=localhost
115115
... secure=False
116116
... httpOnly=False
117-
... expiry=2024-09-15 *:22:33
117+
... expiry=2025-09-01 *:25:00
118118
... extra={'sameSite': 'Lax'}
119119
${cookie} = Get Cookie far_future
120120

121121
*** Keywords ***
122122
Add Cookies
123+
# To update time each September (as Chrome limits cookies to one year expiry date) use
124+
# import datetime
125+
# print (datetime.datetime.strptime("2025-09-01 12:25:00", "%Y-%m-%d %I:%M:%S").timestamp())
123126
Delete All Cookies
124127
Add Cookie test seleniumlibrary
125128
${now} = Get Current Date
126129
${tomorrow_thistime} = Add Time To Date ${now} 1 day
127130
${tomorrow_thistime_datetime} = Convert Date ${tomorrow_thistime} datetime
128131
Set Suite Variable ${tomorrow_thistime_datetime}
129132
Add Cookie another value expiry=${tomorrow_thistime}
130-
Add Cookie far_future timemachine expiry=1726399353 # 2024-09-15 11:22:33
133+
Add Cookie far_future timemachine expiry=1756700700 # 2025-09-01 12:25:00

0 commit comments

Comments
 (0)