Integrate desired capabilities into ChromeOptions

This adds backward compatibility for libraries that use the
desired_capabilities parameter (such as selenium-wire).
This commit is contained in:
jdholtz 2023-08-23 23:11:24 -05:00
parent a415e40b0b
commit 8bfa636507
No known key found for this signature in database
GPG Key ID: A3A87CFD1E4A1B65
1 changed files with 5 additions and 1 deletions

View File

@ -442,7 +442,11 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
self.options = options
if not desired_capabilities:
desired_capabilities = options.to_capabilities()
desired_capabilities = {}
# Compatability for users/libraries still using desired_capabilities
for k, v in desired_capabilities.items():
options.set_capability(k, v)
if not use_subprocess:
self.browser_pid = start_detached(