title: Selenium webdriver NUnit C# - How to disable opening firefox in safe mode?
body: <p>Implicitly the test are run in Firefox safe mode and I need to disable this. I have looked for ways of doing this, but I couldn't find any.</p>
  
  <pre><code>FirefoxProfile profile = new FirefoxProfile();
  profile.SetPreference("toolkit.startup.max_resumed_crashes", "-1");
  IWebDriver driver = new FirefoxDriver(profile);
  </code></pre>
  
  <p><code>profile</code> is not recognized as if it wasn't declared. Here is my code:</p>
  
  <pre><code>namespace Test
  {
      public class Class1
      {
          FirefoxProfile profile = new FirefoxProfile();
          profile.SetPreference("toolkit.startup.max_resumed_crashes", "-1");
          IWebDriver driver = new FirefoxDriver(profile);
      }
  }
  </code></pre>
  
  <p>The error for <code>profile</code> is: </p>
  
  <blockquote>
    <p>'Test.Class1.profile is a field but is used like a 'type'</p>
  </blockquote>