1
0
mirror of https://github.com/django/django.git synced 2025-01-03 15:06:09 +00:00

Fixed #34675 -- Fixed creating remote webdriver for Selenium 4.10.0+.

This commit is contained in:
Jonathan Weth 2023-06-26 14:33:28 +02:00 committed by GitHub
parent 370a021780
commit ecd5a0daaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")