title: Declare Selenium's WebDriver as a global variable with SetUp()
body: <p>My current design is as follows: 
  Web driver is a part of every SetUp in every Test suite (In this case - Chrome)</p>
  
  <pre><code> public void SetUp()
      {
          driver = new ChromeDriver();
          driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);
      }
  </code></pre>
  
  <p>In order to be able to use a global varible in every test suite, I have created: </p>
  
  <pre><code>class Globals
  {
      //drivers
      public static IWebDriver driverChrome = new ChromeDriver();
  
      //ImplicitWait
      public static double ImplicitWaitGlobal = 20;
  }
  </code></pre>
  
  <p>Therefore changed my SetUp() to call the global variable:</p>
  
  <pre><code>public void SetUp()
      {
          driver = Globals.driverChrome;
          driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);
      }
  </code></pre>
  
  <p>All the above works very well BUT an <strong>additional Chrome window</strong> opens every 
  time I run a test (As a result of the creation of a new Chrome driver instance under the Globals class). </p>
  
  <p>The Class looks like this:</p>
  
  <pre><code>public class Some_Tests
  {
      private IWebDriver driver;
      private IWebElement element;
  
      [SetUp]
      public void SetUp()
      {
          driver = new Globals.driverChrome;
          driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);
      }
  
      [Test]
      [Description("myTest1")]
      public void Test_1()
      {
          Navigate.LogIn_SideBar(Enviroment.Env, Users.user1, driver);
      }
  
      [Test]
      [Description("myTest2")]
      public void Test_2()
      {
          Navigate.LogIn_SideBar(Enviroment.Env, Users.user1, driver);
      }
  
      [TearDown]
      public void TearDown()
      {
          driver.Close();
          driver.Quit();
      }
  }
  </code></pre>
  
  <p>Is there a way to pass the driver in a more 'elegant' way without that happening ? </p>
  
  <p>Thanks. </p>