Skip to content

Commit 1c59653

Browse files
committed
[py] firefox profiles can not be deprecated yet
1 parent 377f832 commit 1c59653

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

py/selenium/webdriver/firefox/firefox_profile.py

-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ def __init__(self, profile_directory=None):
5353
This defaults to None and will create a new
5454
directory when object is created.
5555
"""
56-
warnings.warn(
57-
"firefox_profile has been deprecated, please use an Options object", DeprecationWarning, stacklevel=2
58-
)
5956
if not FirefoxProfile.DEFAULT_PREFERENCES:
6057
with open(
6158
os.path.join(os.path.dirname(__file__), WEBDRIVER_PREFERENCES), encoding="utf-8"

py/selenium/webdriver/firefox/options.py

-7
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,12 @@ def set_preference(self, name: str, value: Union[str, int, bool]):
8181
@property
8282
def profile(self) -> FirefoxProfile:
8383
""":Returns: The Firefox profile to use."""
84-
if self._profile:
85-
warnings.warn("Getting a profile has been deprecated.", DeprecationWarning, stacklevel=2)
8684
return self._profile
8785

8886
@profile.setter
8987
def profile(self, new_profile: Union[str, FirefoxProfile]) -> None:
9088
"""Sets location of the browser profile to use, either by string or
9189
``FirefoxProfile``."""
92-
warnings.warn(
93-
"Setting a profile has been deprecated. Please use the set_preference and install_addons methods",
94-
DeprecationWarning,
95-
stacklevel=2,
96-
)
9790
if not isinstance(new_profile, FirefoxProfile):
9891
new_profile = FirefoxProfile(new_profile)
9992
self._profile = new_profile

0 commit comments

Comments
 (0)