title: Refresh page until value changes in Python Selenium
body: <p>I am trying to validate that a value changes to the correct text and if it does not to refresh the page and check again for up to set time.</p>
  
  <p>I have tried while-loops, if statements and nested variations of both with no success. I am not even sure how to format it as this point.</p>
  
  <pre><code>element = driver.find_element_by_xpath('xpath')
  While True:
     if element contains textA
       break
     else if element contains textB
      driver.refresh()
     else
       error
  </code></pre>
  
  <p>Something along those lines. Ignore any syntax errors, I am just trying to get the idea across</p>
  
  <p>I have also tried using EC and By with no luck</p>
  
  <p>Edit: Adding some details</p>
  
  <p>So what I have is a table. I am inserting a new row with no problems. Then I need to check that one of the column values of the new row gets updated from 'new' to 'old' which usually takes about anywhere from 30secs to 2mins. This is all viewable from a web ui. I need to refresh the page in order to see the value change. I wish I had some more detailed code or error to post along with it but honestly I am just beginning to learn Selenium</p>