Skip to content

Commit 47141cd

Browse files
committed
Revert "Merge pull request #157 from SunilMohanAdapa/fix-session-browser-screenshots"
This reverts commit 6c741be, reversing changes made to 2446326.
1 parent 6c741be commit 47141cd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pytest_splinter/plugin.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,15 @@ def _browser_screenshot_session(
467467
if not splinter_session_scoped_browser:
468468
return
469469

470-
for name in request.fixturenames:
471-
value = request.getfixturevalue(name)
470+
fixture_values = (
471+
# pytest 3
472+
getattr(request, "_fixture_values", {})
473+
or
474+
# pytest 2
475+
getattr(request, "_funcargs", {})
476+
)
477+
478+
for name, value in fixture_values.items():
472479
should_take_screenshot = (
473480
hasattr(value, "__splinter_browser__")
474481
and splinter_make_screenshot_on_failure

0 commit comments

Comments
 (0)