diff --git a/src/SeleniumLibrary/keywords/webdrivertools.py b/src/SeleniumLibrary/keywords/webdrivertools.py
index f5969526..3aa14dc8 100644
--- a/src/SeleniumLibrary/keywords/webdrivertools.py
+++ b/src/SeleniumLibrary/keywords/webdrivertools.py
@@ -77,7 +77,8 @@ class WebDriverCreator(object):
     def create_chrome(self, desired_capabilities, remote_url, options=None):
         default = webdriver.DesiredCapabilities.CHROME
         if is_truthy(remote_url):
-            return self._remote(default, desired_capabilities, remote_url)
+            return self._remote(default, desired_capabilities, remote_url,
+                                options=options)
         capabilities = self._combine_capabilites(default, desired_capabilities)
         if SELENIUM_VERSION.major >= 3 and SELENIUM_VERSION.minor >= 8:
             return webdriver.Chrome(desired_capabilities=capabilities,
@@ -97,7 +98,8 @@ class WebDriverCreator(object):
         default = webdriver.DesiredCapabilities.FIREFOX
         profile = self._get_ff_profile(ff_profile_dir)
         if is_truthy(remote_url):
-            return self._remote(default, desired_capabilities, remote_url, profile)
+            return self._remote(default, desired_capabilities, remote_url,
+                                profile, options)
         capabilities = self._combine_capabilites(default, desired_capabilities)
         if SELENIUM_VERSION.major >= 3 and SELENIUM_VERSION.minor >= 8:
             return webdriver.Firefox(capabilities=capabilities, options=options,
@@ -180,10 +182,14 @@ class WebDriverCreator(object):
         return self._remote(default, desired_capabilities, remote_url)
 
     def _remote(self, default_capabilities, user_capabilities, remote_url,
-                profile_dir=None):
+                profile_dir=None, options=None):
         remote_url = str(remote_url)
         capabilities = self._combine_capabilites(default_capabilities,
                                                  user_capabilities)
+        if SELENIUM_VERSION.major >= 3 and SELENIUM_VERSION.minor >= 8:
+            return webdriver.Remote(command_executor=remote_url,
+                                    desired_capabilities=capabilities,
+                                    browser_profile=profile_dir, options=options)
         return webdriver.Remote(command_executor=remote_url,
                                 desired_capabilities=capabilities,
                                 browser_profile=profile_dir)

Headless Firefox and Chrome not working over selenium grid
 I was trying to run headless firefox with custom firefox profile over a selenium grid, But the browser does not open is headless mode.  It opens in the GUI mode

Launch Firefox Grid
    Set Download Directory
    ${profile path}=  set_firefox_profile  ${DOWNLOAD_DIR}
    log  ${profile path}
    ${dict}    Create Dictionary    seleniumProtocol=WebDriver  maxInstances=5  environment=firefox
    Open Browser  about:blank  headlessfirefox  None  http://192.168.99.100:4444/wd/hub    desired_capabilities=${dict}  ff_profile_dir=${profile path}
    Maximize Browser Window

The firefox profile was created like this:
`def set_firefox_profile(download_dir):
    fp = FirefoxProfile()
    fp.set_preference("browser.download.folderList", 2)
    fp.set_preference("browser.download.manager.showWhenStarting", False)
    fp.set_preference("browser.download.dir", download_dir)
    fp.set_preference("browser.manager.closeWhenDone", True)
    fp.set_preference("browser.download.manager.showAlertOnComplete", False)
    fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/plan")
    fp.update_preferences()
    return fp.path`

I have 3.11.0 version of selenium and 3.1.1 version of SeleniumLibrary in my environment


diff --git a/utest/test/keywords/test_webdrivercreator.py b/utest/test/keywords/test_webdrivercreator.py
index c59ad757..e37b2274 100644
--- a/utest/test/keywords/test_webdrivercreator.py
+++ b/utest/test/keywords/test_webdrivercreator.py
@@ -69,7 +69,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.CHROME
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_chrome({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -90,6 +91,19 @@ class WebDriverCreatorTests(unittest.TestCase):
             verify(options, times=0).set_headless()
         self.assertEqual(driver, expected_webdriver)
 
+    def test_chrome_healdless_with_grid(self):
+        caps = webdriver.DesiredCapabilities.CHROME
+        expected_webdriver = mock()
+        options = mock()
+        when(webdriver).ChromeOptions().thenReturn(options)
+        remote_url = 'localhost:4444'
+        when(webdriver).Remote(command_executor=remote_url,
+                               desired_capabilities=caps, options=options,
+                               browser_profile=None,).thenReturn(expected_webdriver)
+        driver = self.creator.create_headless_chrome({}, remote_url)
+        verify(options).set_headless()
+        self.assertEqual(driver, expected_webdriver)
+
     def test_firefox(self):
         expected_webdriver = mock()
         profile = mock()
@@ -116,7 +130,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.FIREFOX
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=profile).thenReturn(expected_webdriver)
+                               browser_profile=profile,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_firefox({}, url, None)
         self.assertEqual(driver, expected_webdriver)
 
@@ -157,6 +172,21 @@ class WebDriverCreatorTests(unittest.TestCase):
         driver = self.creator.create_headless_firefox({}, None, None)
         self.assertEqual(driver, expected_webdriver)
 
+    def test_firefox_healdless_with_grid(self):
+        caps = webdriver.DesiredCapabilities.FIREFOX
+        expected_webdriver = mock()
+        options = mock()
+        when(webdriver).FirefoxOptions().thenReturn(options)
+        profile = mock()
+        when(webdriver).FirefoxProfile().thenReturn(profile)
+        remote_url = 'localhost:4444'
+        when(webdriver).Remote(command_executor=remote_url,
+                               desired_capabilities=caps, options=options,
+                               browser_profile=profile,).thenReturn(expected_webdriver)
+        driver = self.creator.create_headless_firefox({}, remote_url, None)
+        verify(options).set_headless()
+        self.assertEqual(driver, expected_webdriver)
+
     def test_ie(self):
         expected_webdriver = mock()
         caps = webdriver.DesiredCapabilities.INTERNETEXPLORER
@@ -170,7 +200,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.INTERNETEXPLORER
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_ie({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -187,7 +218,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.EDGE
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_edge({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -204,7 +236,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.OPERA
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_opera({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -221,7 +254,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.SAFARI
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_safari({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -238,7 +272,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.PHANTOMJS
         when(webdriver).Remote(command_executor=url,
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_phantomjs({}, url)
         self.assertEqual(driver, expected_webdriver)
 
@@ -247,7 +282,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.HTMLUNIT
         when(webdriver).Remote(command_executor='None',
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_htmlunit({}, None)
         self.assertEqual(driver, expected_webdriver)
 
@@ -256,7 +292,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.HTMLUNITWITHJS
         when(webdriver).Remote(command_executor='None',
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_htmlunit_with_js({}, None)
         self.assertEqual(driver, expected_webdriver)
 
@@ -265,7 +302,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.ANDROID
         when(webdriver).Remote(command_executor='None',
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_android({}, None)
         self.assertEqual(driver, expected_webdriver)
 
@@ -274,7 +312,8 @@ class WebDriverCreatorTests(unittest.TestCase):
         caps = webdriver.DesiredCapabilities.IPHONE
         when(webdriver).Remote(command_executor='None',
                                desired_capabilities=caps,
-                               browser_profile=None).thenReturn(expected_webdriver)
+                               browser_profile=None,
+                               options=None).thenReturn(expected_webdriver)
         driver = self.creator.create_iphone({}, None)
         self.assertEqual(driver, expected_webdriver)
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
apt-get update apt-get install -y gcc
3.6
requirements.txt requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
allpairspy==2.5.0
approval-utilities==8.0.0
approvaltests==8.0.0
attrs==22.2.0
beautifulsoup4==4.12.3
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
empty-files==0.0.3
execnet==1.9.0
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
mockito==1.4.0
mrjob==0.7.4
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pyperclip==1.9.0
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
PyYAML==6.0.1
requests==2.27.1
robotframework==6.1.1
-e git+https://github.com/robotframework/SeleniumLibrary.git@c69f2cc9d080f49046af2b2b8c888a0c150eaffc#egg=robotframework_seleniumlibrary
robotstatuschecker==4.1.0
selenium==3.141.0
six==1.17.0
soupsieve==2.3.2.post1
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.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
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - 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=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - allpairspy==2.5.0
      - approval-utilities==8.0.0
      - approvaltests==8.0.0
      - attrs==22.2.0
      - beautifulsoup4==4.12.3
      - charset-normalizer==2.0.12
      - coverage==6.2
      - empty-files==0.0.3
      - execnet==1.9.0
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - mockito==1.4.0
      - mrjob==0.7.4
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pyperclip==1.9.0
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - pyyaml==6.0.1
      - requests==2.27.1
      - robotframework==6.1.1
      - robotstatuschecker==4.1.0
      - selenium==3.141.0
      - six==1.17.0
      - soupsieve==2.3.2.post1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/SeleniumLibrary

utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_android utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_chrome_healdless_with_grid utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_chrome_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_edge_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_firefox_healdless_with_grid utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_firefox_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_htmlunit utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_htmlunit_with_js utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_ie_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_iphone utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_opera_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_phantomjs_remote utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_safari_remote
utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_chrome utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_chrome_healdless utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_combine_capabilites utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_create_driver_chrome utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_create_driver_firefox utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_create_driver_ie utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_edge utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_firefox utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_firefox_headless utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_firefox_profile utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_get_creator_method utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_ie utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_opera utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_parse_capabilities utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_phantomjs utest/test/keywords/test_webdrivercreator.py::WebDriverCreatorTests::test_safari
src/SeleniumLibrary/keywords/webdrivertools.py
src/SeleniumLibrary/keywords/webdrivertools.py