SpecFlowOSS / SpecFlow.Actions

BSD 3-Clause "New" or "Revised" License
57 stars 53 forks source link

[Question] Instances lifetime #31

Closed DomZZ closed 2 years ago

DomZZ commented 3 years ago

Hi,

I drop my custom code to use SpecFlow.Actions.Selenium but I'm having some questions about the lifetime on instanciated objects :

Also can you give me the same answer for SpecflowOutputDriver and all other injected objects if possible

JordanWestern commented 3 years ago

Hi @DomZZ ,

You can see the implementation of the driver in this project - https://github.com/SpecFlowOSS/SpecFlow.Actions/tree/main/Plugins/SpecFlow.Actions.Selenium

I am not familiar with SpecflowOutputDriver but again you will find it in the repo somewhere

SabotageAndi commented 2 years ago

BrowserDriver and the WebDriver have the lifetime of the Scenario.

ISpecFlowOutputHelper has a lifetime of the test thread.

You can find a not complete overview which class is registered in which container here: https://docs.specflow.org/projects/specflow/en/latest/Extend/Available-Containers-%26-Registrations.html