Skip to content

Commit

Permalink
Merge pull request #157 from SunilMohanAdapa/fix-session-browser-scre…
Browse files Browse the repository at this point in the history
…enshots

Fix auto screenshots for session browser
  • Loading branch information
mpasternak committed Aug 7, 2022
2 parents 2446326 + 5319356 commit 6c741be
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pytest_splinter/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,15 +467,8 @@ def _browser_screenshot_session(
if not splinter_session_scoped_browser:
return

fixture_values = (
# pytest 3
getattr(request, "_fixture_values", {})
or
# pytest 2
getattr(request, "_funcargs", {})
)

for name, value in fixture_values.items():
for name in request.fixturenames:
value = request.getfixturevalue(name)
should_take_screenshot = (
hasattr(value, "__splinter_browser__")
and splinter_make_screenshot_on_failure
Expand Down

0 comments on commit 6c741be

Please sign in to comment.