Skip to content

Commit

Permalink
test code changes, fixed deprication issue
Browse files Browse the repository at this point in the history
  • Loading branch information
surapuramakhil committed Dec 2, 2024
1 parent 84e3cea commit 19b36c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/webdrivers/firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def create_options(self) -> webdriver.FirefoxOptions:
options.set_preference(key, value)

if self.profile.profile_path:
profile = webdriver.FirefoxProfile(self.profile.profile_path)
options.profile = profile
options.set_preference("profile", self.profile.profile_path)
logger.debug(f"Using Firefox profile directory: {self.profile.profile_path}")
else:
options.set_preference("browser.privatebrowsing.autostart", True)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_scroll_slow_element_not_scrollable(mocker):

# Test chrome_browser_options function
def test_chrome_browser_options(mocker):
mocker.patch("os.path.dirname", return_value="/mocked/path")
mocker.patch("os.path.dirname", return_value="mocked/path")
mocker.patch("os.path.basename", return_value="profile_directory")

mock_options = mocker.Mock()
Expand Down

0 comments on commit 19b36c1

Please sign in to comment.