Skip to content

Commit

Permalink
[py] explicitly deprecate FirefoxProfile class
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Nov 13, 2020
1 parent 32d0ef7 commit 04a7dc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions py/selenium/webdriver/firefox/firefox_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import shutil
import sys
import tempfile
import warnings
import zipfile
from io import BytesIO
from xml.dom import minidom
Expand Down Expand Up @@ -54,6 +55,8 @@ 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)) as default_prefs:
Expand Down

0 comments on commit 04a7dc1

Please sign in to comment.