fix service_creationflags

On Selenium < 4.6.0 it was Service.creationflags
Its now Service.creation_flags
This commit is contained in:
sebdelsol 2022-11-06 15:55:34 +01:00 committed by GitHub
parent 1c45a39000
commit 2ef9791abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -409,7 +409,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
service = Service(
patcher.executable_path, port, service_args, service_log_path
)
service.creationflags = service_creationflags
for attr_name in ("creationflags", "creation_flags"):
if hasattr(service, attr_name):
setattr(service, attr_name, service_creationflags)
break
else:
service = None