-
Notifications
You must be signed in to change notification settings - Fork 785
Description
We currently have Get Cookie Value but it only returns the value, not other information such as expiry. We have few possibilities how this could be implemented:
-
Enhance the existing
Get Cookie Valueto allow returning other info too. For backwards compatibility reasons its default behavior cannot change, but it could get a new optional argument likeinfo='value'that could be used like this:${value} = Get Cookie Value name Log ${value} ${expiry} = Get Cookie Value name info=expiry Log ${expiry} -
Add separate new keyword like
Get CookieorGet Cookie Informationthat returns a custom object containing all cookie information in its attributes. This info could then be used in the data easily:${cookie} = Get Cookie name Log ${cookie.value} Log ${cookie.expiry} -
Enhance the existing
Get Cookie Valueto return an object with all the cookie information.
My favorite is option 2. If we decide to do that, then we could consider deprecating the existing Get Cookie Value. We should also think what to do with the current Get Cookies which returns a string in format cookie1=value1; cookie2=value2. It should rather return a list of cookie objects, but that change would be backwards incompatible. I have an idea how it could be deprecated pretty gracefully, though.