Skip to content

Commit 223a4f6

Browse files
Fix deprecation warnings for Safari (#9577)
Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk>
1 parent e46dba5 commit 223a4f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

py/selenium/webdriver/safari/webdriver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ def __init__(self, port=0, executable_path=DEFAULT_EXECUTABLE_PATH, reuse_servic
5656
HTTP keep-alive. Defaults to True.
5757
- service_args : List of args to pass to the safaridriver service
5858
"""
59-
if port == 0:
59+
if port:
6060
warnings.warn("port has been deprecated, please set it via the service class",
6161
DeprecationWarning, stacklevel=2)
6262

6363
if executable_path != DEFAULT_EXECUTABLE_PATH:
6464
warnings.warn("executable_path has been deprecated, please use the Options class to set it",
6565
DeprecationWarning, stacklevel=2)
66-
if not reuse_service:
66+
if reuse_service:
6767
warnings.warn("reuse_service has been deprecated, please use the Service class to set it",
6868
DeprecationWarning, stacklevel=2)
6969
if desired_capabilities != DEFAULT_SAFARI_CAPS:
7070
warnings.warn("desired_capabilities has been deprecated, please use the Options class to set it",
7171
DeprecationWarning, stacklevel=2)
72-
if not quiet:
72+
if quiet:
7373
warnings.warn("quiet has been deprecated, please use the Service class to set it",
7474
DeprecationWarning, stacklevel=2)
7575
if not keep_alive:

0 commit comments

Comments
 (0)