title: Using selenium webdriver to test on multiple browsers
body: <p>information: using visual studio 2012, creating a .Net webproject
               Running (latest versions) selenium with chrome and firefox.
               UI testing - before my implementation of the foreach loop and list works perfectly</p>
  
  <p>i want to be able to run the test once and it occur across both of the browsers, simultaneous or one after the other is not too important but i am having trouble trying to code this...</p>
  
  <p>below is a snippet of the simplicity and roughly the way i wanted to try and code this and being a novice when it comes to this i was wondering if anyone can help me out and also not make it too complex.</p>
  
  <pre><code> static void Main(string[] args)
          {
              IWebDriver _driver;
  
  
              ChromeOptions options = new ChromeOptions();
              options.AddArgument("--start-maximized");
  
  
              var verificationErrors = new StringBuilder();
  
              List&lt;object&gt; browserList = new List&lt;object&gt;();
  
              browserList.Add(_driver = new ChromeDriver(options));
              browserList.Add(_driver = new FirefoxDriver());
  
              var _browser = browserList;
  
              foreach (object element in browserList)
              {
                  _driver.Navigate().GoToUrl("http://myURL.com/");
                  _driver.FindElement(By.Id("Username")).Clear();
                  _driver.FindElement(By.Id("Username")).SendKeys("Username");
                  _driver.FindElement(By.Id("Password")).Clear();
                  _driver.FindElement(By.Id("Password")).SendKeys("Password");
  </code></pre>
  
  <p>and so on... im not sure if this sort of code is even passable and would work? any help would be much obliged!</p>