0

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.

laxsore
  • 143
  • 1
  • 2
  • 9
  • 1
    We usually do not interact with a web page to clean up data. Can you make calls to the database or a web service to do this? – Greg Burghardt Aug 18 '23 at 12:21

0 Answers0