title: Python, Selenium find element with class and wait for class change
body: <p>I have a web page which loads content dynamically and while page loads, there is spinning wheel, I already found solution to grab content loaded immediately on page, but seems i can't find solution to grab content loaded later in dom.</p>
  
  <p>What i can think of is to find element with specific class of that wheel spinning, and wait for it to change, once it's changed, than it means content is loaded in dom.</p>
  
  <p>I am using <code>Selenium</code> with <code>Firefox</code> <code>webdriver</code> on <code>Ubuntu</code>.</p>
  
  <p>Here is the class i am looking to monitor:</p>
  
  <pre><code>&lt;div class="wheel spinning"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Once content is loaded, wheel stop spinning and class is changed to:</p>
  
  <pre><code>&lt;div class="wheel"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Anyone find solution to find and monitor <code>class="wheel spinning"</code> and once it's changed to <code>class="wheel"</code> to continue to grab data.</p>
  
  <p>Edit:</p>
  
  <p>The XPATH actually solved one part of solution, here's part of code</p>
  
  <pre><code>try:
      element = WebDriverWait(driver, 10).until(
  EC.presence_of_element_located((By.XPATH, "//*[@class='wheel']))
  )
  title = driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[3]')
  print(title.text)
  </code></pre>
  
  <p>But if element don't appear within 10 seconds it error's out, now to find a way to retry again and again until element is present on page.</p>
  
  <p>Is there a difference in use <code>presence_of_element_located((By.XPATH))</code> and <code>find_element_by_xpath</code></p>