title: Selenium WebDriverWait throwing exception
body: <p>I'm trying to wait until a element is present before continuing, however with the method I'm currently using it's throwing element does not exist, even before timeout has ended.</p>
  
  <p>Example usage:</p>
  
  <pre><code> using OpenQA.Selenium;
   using OpenQA.Selenium.Chrome;
   using OpenQA.Selenium.Support.UI;
  
   private static WebDriverWait wait = new WebDriverWait(driver, System.TimeSpan.FromSeconds(30)); // inside parent class (not method)
  
   //public static void Method1()
  
   wait.Until(driver =&gt; driver.FindElement(By.CssSelector("[foo=bar]")));
  </code></pre>
  
  <p>which should then wait 30 seconds or until element is present, but it instantly throws element not found exception...</p>