Selenium c# custom expected conditions for innerText
<p><strong>the html</strong> </p>

<blockquote>
  <p><code>&lt;span id="banner"&gt;Rolling in 10.00...&lt;/span&gt;</code></p>
</blockquote>

<p><strong>my code</strong></p>

<pre><code>public void waitroller()
    {

        Console.WriteLine("waiting roller");
        WebDriverWait wait = new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromDays(2));
        wait.Until&lt;IWebElement&gt;((d) =&gt;
        {
            IWebElement element = PropertiesCollection.driver.FindElement(By.Id("banner"));
            if (element.Text == "Rolling in 20.00...")
            {
                return element;
            }

            return null;
        });

    }
</code></pre>

<p><strong>OR</strong></p>

<pre><code>public void waitroller()
    {

        new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromMinutes(1.5)).Until(ExpectedConditions.TextToBePresentInElementLocated(By.Id("banner") , "Rolling in 20.00..."));
    }
</code></pre>

<p>I'm stuck with this innertext because the innertext in the html is always changing and i want to make a webdriverwait that waits until the innertext in the span banner is "Rolling in 20.00" . Is there any way to make custom expected conditions because I am not understand custom expected condition.</p>

<p>what i need is something like this </p>

<p>new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromMinutes(1.5)).Until(ExpectedConditions.TextToBePresentInElement(PropertiesCollection.driver.FindElement(By.Id("banner"), "Rolling in 20.00...");</p>

<p>but this is not work because i think the id="banner" is innerText</p>

<p>there is one way that work but can't work for long because i think it is the wrong way of doing it . i loop the element banner many times and check if the innerText is equals to "Rolling in 20.00..." but have error also</p>