I have several files that will require access to an object, which I want initialized only once. I considered making a static variable, but I'd rather stay away from that. Here's my question along with code:
[SetUpFixture] public class TestSetup { public IWebDriver driver; [SetUp] public void SetUp() { driver = new ChromeDriver(); } [TearDown] public void TearDown() { driver.Dispose(); } } Do my tests within the namespace of this SetUpFixture have access to driver?
EDIT: Looks like an approach to this is answered here. I'm still open to other options than what Jon pointed out.