I want to create after test run rook to clean data after run. For AfterScenario hooks I'm using ScenarioContext from injection:
public Hooks(ScenarioContext scenarioContext)
{
_scenarioContext = scenarioContext;
}
later I can call Pages inside scenario hooks:
var creditPage = _scenarioContext.ScenarioContainer.Resolve<CreditPage>();
I dont know however how to access page inside AfterTestRun which has to be static.