Skip to content

Commit

Permalink
[py] Only give deprecation warning if Profile is being used in options
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Mar 26, 2021
1 parent d798b52 commit 957b37e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions py/selenium/webdriver/firefox/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ def profile(self) -> FirefoxProfile:
"""
:Returns: The Firefox profile to use.
"""
warnings.warn(
"Getting a profile has been deprecated.",
DeprecationWarning,
stacklevel=2
)
if self._profile:
warnings.warn(
"Getting a profile has been deprecated.",
DeprecationWarning,
stacklevel=2
)
return self._profile

@profile.setter
Expand Down

0 comments on commit 957b37e

Please sign in to comment.