title: Selenium Wait for Page Source Contains
body: <p>I was just wondering if there's an elegant way to utilize <code>ExpectedConditions</code> or something else to have my code wait for a page's source to contain a given string until a given timeout.  I know I can use something like this if I wanted to use a specific element's locator ...</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver,10);
  wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("foobar")));
  </code></pre>
  
  <p>But I wanted to accomplish this without using a locator for a specific element, and just use the whole page source as my reference instead.  Any suggestions?</p>