title: Finding text in 100 pages
body: <p>I was asked this in a recent interview:</p>
  
  <p><em>Imagine you have a website with 100 pages listing various products a company offers. The company decides to change a particular name of product from "A" to "B". Someone has obliged and changed the names, and now the company wants to make sure that all the replacements have been made. 
  What will you do to check if all the replacements have indeed been made?</em></p>
  
  <p>( No tags were mentioned, nothing else)</p>
  
  <p>Possible Answers:</p>
  
  <p>1.</p>
  
  <blockquote>
    <p>I thought it would be easier to just open the site and use a search
    bar to iterate over all the pages manually. Or maybe calling all the
    p, h1, h2, h3, etc elements and iterating over them. But i'm sure
    there is a better way.</p>
  </blockquote>
  
  <p>2.</p>
  
  <pre><code> //A possible solution
   if(driver.getPageSource().contains("your Text"))
  {
      //What should the code be here?
  }
  
  else
  {
      //Click abc
  }
  </code></pre>