title: Wait for at least 5 minutes for element to appear
body: <p>I tried a lot of solutions in the internet but everyone of them didn't work on al cases, I just want to wait until the element appear in the web page, I'm using selenium for c#
  two of the things that I tried, and the two of them throw an exception once in a while, I just don't want to get an exception, I want my automation to wait for at least 5 minutes for the web page to load.</p>
  
  <pre><code>public class WaitForElement
      {
          public void WaitFE(string Xpath,IWebDriver webDriver)
          {
              WebDriverWait wait = new WebDriverWait(webDriver,    TimeSpan.FromMinutes(120));
              wait.Until(d =&gt; d.FindElement(By.XPath(Xpath)).Displayed);
              //IWebElement category = wait.Until&lt;IWebElement&gt;((d) =&gt;
              //{
              //    return d.FindElement(By.XPath(Xpath));
              //});
  
          }
      }
  </code></pre>