Skip to content

Commit

Permalink
[py] firefox profiles can not be deprecated yet
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 17, 2023
1 parent 377f832 commit 1c59653
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions py/selenium/webdriver/firefox/firefox_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def __init__(self, profile_directory=None):
This defaults to None and will create a new
directory when object is created.
"""
warnings.warn(
"firefox_profile has been deprecated, please use an Options object", DeprecationWarning, stacklevel=2
)
if not FirefoxProfile.DEFAULT_PREFERENCES:
with open(
os.path.join(os.path.dirname(__file__), WEBDRIVER_PREFERENCES), encoding="utf-8"
Expand Down
7 changes: 0 additions & 7 deletions py/selenium/webdriver/firefox/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,12 @@ def set_preference(self, name: str, value: Union[str, int, bool]):
@property
def profile(self) -> FirefoxProfile:
""":Returns: The Firefox profile to use."""
if self._profile:
warnings.warn("Getting a profile has been deprecated.", DeprecationWarning, stacklevel=2)
return self._profile

@profile.setter
def profile(self, new_profile: Union[str, FirefoxProfile]) -> None:
"""Sets location of the browser profile to use, either by string or
``FirefoxProfile``."""
warnings.warn(
"Setting a profile has been deprecated. Please use the set_preference and install_addons methods",
DeprecationWarning,
stacklevel=2,
)
if not isinstance(new_profile, FirefoxProfile):
new_profile = FirefoxProfile(new_profile)
self._profile = new_profile
Expand Down

0 comments on commit 1c59653

Please sign in to comment.