title: Selenium: When new IWebDriver is created, browser launches then closes then relaunches a new session
body: <p>I'm using Firefox and the icon will appear in the taskbar for half a second before closing. Then Firefox will launch again with the URL </p>
  
  <p>about:blank&amp;utm_content=firstrun</p>
  
  <p>(Even though homepage is set to Google).</p>
  
  <p>Could this be a environment variable issue? I haven't touched the path.</p>
  
  <p>Basically, this is blocking me because the other statements will run into NoSuchElementException...</p>
  
  <p>This is my code:</p>
  
  <pre><code>        using System;
  using OpenQA.Selenium;
   using OpenQA.Selenium.Firefox;
   using OpenQA.Selenium.Support.UI;
  
          namespace HomeAuto {
              class Program
              {
                  static void Main(string[] args)
                  {
                      IWebDriver driver = new FirefoxDriver();
                      Thread.Sleep(5000);
                      driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
                      driver.Navigate().GoToUrl("www.trademe.co.nz");
                      SelectElement categories = new SelectElement(driver.FindElement(By.Id("SearchType")));
                      categories.SelectByValue("202");
                      IWebElement searchBox = driver.FindElement(By.Id("searchString"));
                      searchBox.SendKeys("Some game");
                      searchBox.Submit();
  
                      driver.Close();
  
                  }
              }
          }
  </code></pre>