@AfterScenario should execute in reverse order to @BeforeScenario

Description

Consider WebDriver situations, where the order below is nearly always going to be the case:

new PerStoriesWebDriverSteps(..),
new PerStoriesContextView(..),
new WebDriverScreenshotOnFailure(..)

If we change from PerStoriesWebDriverSteps to PerScenarioWebDriverSteps, then we have a problem. PerScenarioWebDriverSteps could conceivable drop the reference to WebDriver after closing it, and cause WebDriverScreenshotOnFailure to fail when it's needing to leap into action.

The reproduction involved making steps fail, and making the PerStoriesWebDriverSteps to PerScenarioWebDriverSteps change.

Assignee

Paul Hammant

Reporter

Paul Hammant

Labels

None

Fix versions

Priority

Major
Configure