diff --git a/src/SeleniumLibrary/keywords/cookie.py b/src/SeleniumLibrary/keywords/cookie.py
index 493b83b0..014eac42 100644
--- a/src/SeleniumLibrary/keywords/cookie.py
+++ b/src/SeleniumLibrary/keywords/cookie.py
@@ -175,5 +175,5 @@ class CookieInformation(object):
         string = '\n'.join('%s=%s' % (item, getattr(self, item))
                            for item in items)
         if self.extra:
-            string = '%s%s=%s\n' % (string, 'extra', self.extra)
+            string = '%s\n%s=%s\n' % (string, 'extra', self.extra)
         return string

Get Cookies keyword will fail if the Selenium get_cookie method return value contains more keys than: name, value, path, domain, secure, httpOnly and expiry
Selenium [get_cookie](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html?highlight=get_cookie#selenium.webdriver.remote.webdriver.WebDriver.get_cookie) returns a dictionary. If the dictionary contains more keys then the `name`, `value`, `path`, `domain`, `secure`, `httpOnly` and `expiry`, then the Get Cookies keyword will fail:
```
20190212 16:54:43.113 :  FAIL : TypeError: __init__() got an unexpected keyword argument 'hCode'
20190212 16:54:43.113 : DEBUG :
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\SeleniumLibrary\__init__.py", line 369, in run_keyword
    return DynamicCore.run_keyword(self, name, args, kwargs)
  File "C:\Python27\lib\site-packages\SeleniumLibrary\base\robotlibcore.py", line 102, in run_keyword
    return self.keywords[name](*args, **kwargs)
  File "C:\Python27\lib\site-packages\SeleniumLibrary\keywords\cookie.py", line 99, in get_cookie
    return CookieInformation(**cookie)
```
This is because the Get Cookies keywords has hard coded keys what Selenium response [can contain in the CookieInformation](https://github.com/robotframework/SeleniumLibrary/blob/master/src/SeleniumLibrary/keywords/cookie.py#L152) object. The limitation has been in place since the SeleniumLibrary 3.0 release, but there was issue reported in Slack, that for that particular user, Selenium `get_cookie` did return the following:
```
{u'domain': u'1.2.3.4', u'name': u'components_state', u'value': u'alsdjaslkdjasdlkj', u'path': u'/', u'hCode': -1693023704, u'class': u'org.openqa.selenium.Cookie', u'httpOnly': False, u'secure': False}
```
SeleniumLibrary should not fail, if the Selenium `get_cookie`  returns more keys that [is specified ](https://w3c.github.io/webdriver/#dfn-table-for-cookie-conversion). Instead we should allow extra keys to be passed to the `CookieInformation` object and allow access to the extra keys in similar way as the specified keys. 
diff --git a/utest/test/keywords/test_cookie.py b/utest/test/keywords/test_cookie.py
index 3e951135..056139b6 100644
--- a/utest/test/keywords/test_cookie.py
+++ b/utest/test/keywords/test_cookie.py
@@ -105,7 +105,7 @@ class CookieObjecttest(unittest.TestCase):
         self.assertEqual(cookie.value, '123')
         self.assertEqual(cookie.extra, {'class_name': 'seleniumLibary'})
         string = str(cookie)
-        self.assertIn("extra={'class_name': 'seleniumLibary'}", string)
+        self.assertIn("\nextra={'class_name': 'seleniumLibary'}", string)
 
     def test_no_mandatory_args(self):
         cookie_dict = self.all_args.copy()

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio mockito
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
certifi==2025.1.31
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
h11==0.14.0
idna==3.10
iniconfig==2.1.0
mockito==1.5.4
outcome==1.3.0.post0
packaging==24.2
pluggy==1.5.0
PySocks==1.7.1
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
robotframework==7.2.2
-e git+https://github.com/robotframework/SeleniumLibrary.git@2264ac1ec3c4909e8b81a9f5401f79bdea75b254#egg=robotframework_seleniumlibrary
selenium==4.30.0
sniffio==1.3.1
sortedcontainers==2.4.0
tomli==2.2.1
trio==0.29.0
trio-websocket==0.12.2
typing_extensions==4.13.0
urllib3==2.3.0
websocket-client==1.8.0
wsproto==1.2.0

name: SeleniumLibrary
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - certifi==2025.1.31
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - h11==0.14.0
      - idna==3.10
      - iniconfig==2.1.0
      - mockito==1.5.4
      - outcome==1.3.0.post0
      - packaging==24.2
      - pluggy==1.5.0
      - pysocks==1.7.1
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - robotframework==7.2.2
      - selenium==4.30.0
      - sniffio==1.3.1
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - trio==0.29.0
      - trio-websocket==0.12.2
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - websocket-client==1.8.0
      - wsproto==1.2.0
prefix: /opt/conda/envs/SeleniumLibrary

utest/test/keywords/test_cookie.py::CookieObjecttest::test_extra_args
utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_default utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_domain_false utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_domain_true utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_path_false utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_path_true utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_secure_false utest/test/keywords/test_cookie.py::KeywordArgumentsCookieTest::test_add_cookie_secure_true utest/test/keywords/test_cookie.py::CookieObjecttest::test_all_args utest/test/keywords/test_cookie.py::CookieObjecttest::test_name_value_only utest/test/keywords/test_cookie.py::CookieObjecttest::test_no_mandatory_args
src/SeleniumLibrary/keywords/cookie.py
src/SeleniumLibrary/keywords/cookie.py