Fixed #34675 -- Fixed creating remote webdriver for Selenium 4.10.0+.
This commit is contained in:
parent
370a021780
commit
ecd5a0daaf
@ -87,14 +87,15 @@ class SeleniumTestCaseBase(type(LiveServerTestCase)):
|
|||||||
return options
|
return options
|
||||||
|
|
||||||
def create_webdriver(self):
|
def create_webdriver(self):
|
||||||
|
options = self.create_options()
|
||||||
if self.selenium_hub:
|
if self.selenium_hub:
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
|
|
||||||
return webdriver.Remote(
|
for key, value in self.get_capability(self.browser).items():
|
||||||
command_executor=self.selenium_hub,
|
options.set_capability(key, value)
|
||||||
desired_capabilities=self.get_capability(self.browser),
|
|
||||||
)
|
return webdriver.Remote(command_executor=self.selenium_hub, options=options)
|
||||||
return self.import_webdriver(self.browser)(options=self.create_options())
|
return self.import_webdriver(self.browser)(options=options)
|
||||||
|
|
||||||
|
|
||||||
@tag("selenium")
|
@tag("selenium")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user