title: How set delay for the element using JavaScript 'readyState'?
body: <p>I write auto tests for web app and I have a problem with delay. I don't want to use sleeps in my script, so I wrote the next:</p>
  <pre><code>public bool WaitForPageToLoadCompletely()
          {
              return new WebDriverWait(driver, TimeSpan.FromSeconds(20)).Until(d =&gt;
              ((IJavaScriptExecutor)d).ExecuteScript(&quot;return document.readyState&quot;).Equals(&quot;complete&quot;));
          }
  </code></pre>
  <p>But it works only for whole page, but not for the elements on the page.</p>
  <p>I am looking something like this, but for the element.</p>
  <p>Thank you!</p>