summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Weth <github@jonathanweth.de>2023-06-26 14:33:28 +0200
committerGitHub <noreply@github.com>2023-06-26 14:33:28 +0200
commitecd5a0daaf7bda6154175df2280f888099deefe8 (patch)
tree88265fa395a7ab7891e698f9f0a0d5cde6cd8d57
parent370a021780b25123a410ffa771ed7d88b8760570 (diff)
Fixed #34675 -- Fixed creating remote webdriver for Selenium 4.10.0+.
-rw-r--r--django/test/selenium.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/django/test/selenium.py b/django/test/selenium.py
index fa9bf461d1..9dc806de92 100644
--- a/django/test/selenium.py
+++ b/django/test/selenium.py
@@ -87,14 +87,15 @@ class SeleniumTestCaseBase(type(LiveServerTestCase)):
return options
def create_webdriver(self):
+ options = self.create_options()
if self.selenium_hub:
from selenium import webdriver
- return webdriver.Remote(
- command_executor=self.selenium_hub,
- desired_capabilities=self.get_capability(self.browser),
- )
- return self.import_webdriver(self.browser)(options=self.create_options())
+ for key, value in self.get_capability(self.browser).items():
+ options.set_capability(key, value)
+
+ return webdriver.Remote(command_executor=self.selenium_hub, options=options)
+ return self.import_webdriver(self.browser)(options=options)
@tag("selenium")