title: Error CS0103: The name 'TimeSpan' does not exist in the current context (CS0103) (testingProgram)?
body: <p>I am trying to create tests in C# with selenium driver in visual studio. I get the following error. Error CS0103: The name 'TimeSpan' does not exist in the current context (CS0103) (testingProgram) ?? I also have a second error displayed in the images provided. The code uses the PageObjectPattern >> <a href="https://www.automatetheplanet.com/page-object-pattern/" rel="nofollow noreferrer">https://www.automatetheplanet.com/page-object-pattern/</a> </p>
  
  <p>Btw I am using a mac. I have added some images to help better describe the situation.The following images show both files. Can someone please try to run in on their end to see if it works.</p>
  
  <p>How do I fix this? Can someone try and run the program to see if it is running on their end?? How do I get this program to run successfully?</p>
  
  <p><a href="https://i.stack.imgur.com/gIcmr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gIcmr.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/OnPev.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OnPev.png" alt="enter image description here"></a></p>
  
  <p>here is the following code-</p>
  
  <pre><code>using Microsoft.VisualStudio.TestTools.UnitTesting;
  using OpenQA.Selenium;
  using OpenQA.Selenium.Firefox;
  using OpenQA.Selenium.Support;
  using OpenQA.Selenium.Support.UI;
  
  [TestClass]
  public class SearchEngineTests
  {
      public IWebDriver Driver { get; set; }
      public WebDriverWait Wait { get; set; }
  
      [TestInitialize]
      public void SetupTest()
      {
          this.Driver = new FirefoxDriver();
          this.Wait = new WebDriverWait(this.Driver, TimeSpan.FromSeconds(30));
      }
  
      [TestCleanup]
      public void TeardownTest()
      {
          this.Driver.Quit();
      }
  
      [TestMethod]
      public void SearchTextInSearchEngine_First()
      {
          SearchEngineMainPage searchEngineMainPage = new SearchEngineMainPage(this.Driver);
          searchEngineMainPage.Navigate();
          searchEngineMainPage.Search("Automate The Planet");
          searchEngineMainPage.ValidateResultsCount("264,000 RESULTS");
      }
  }
  </code></pre>
  
  <p>here is the second file-</p>
  
  <pre><code>using Microsoft.VisualStudio.TestTools.UnitTesting;
  using OpenQA.Selenium;
  using OpenQA.Selenium.Support.PageObjects;
  
  public class SearchEngineMainPage
  {
      private readonly IWebDriver driver;
      private readonly string url = @"searchEngineUrl";
  
  
      [FindsBy(How = How.Id, Using = "sb_form_q")]
      public IWebElement SearchBox { get; set; }
  
      [FindsBy(How = How.Id, Using = "sb_form_go")]
      public IWebElement GoButton { get; set; }
  
      [FindsBy(How = How.Id, Using = "b_tween")]
      public IWebElement ResultsCountDiv { get; set; }
  
      public void Navigate()
      {
          this.driver.Navigate().GoToUrl(this.url);
      }
  
      public void Search(string textToType)
      {
          this.SearchBox.Clear();
          this.SearchBox.SendKeys(textToType);
          this.GoButton.Click();
      }
  
      public void ValidateResultsCount(string expectedCount)
      {
          Assert.IsTrue(this.ResultsCountDiv.Text.Contains(expectedCount), "The results DIV doesn't contains the specified text.");
      }
  }
  </code></pre>