title: Why do I get StaleElementReferenceException when I "read" the text contents of a column?
body: <p>The issue occurs only when I try to collect ("crawl") the contents of a table twice. The first time that I read the table's contents is successful but the second time always fails.</p>
  
  <p>This happens only with the Chrome browser (Version 74 with a corresponding chromedriver) . I tried the same with FireFox and it never occurs. I found a certain workaround in Chrome, which doesn't make any sense but it does the job.</p>
  
  <p>When I "go" to other screen than the one that includes the table and then return back then the table crawling succeeds.</p>
  
  <p>The following is the function that I use in order to collect the table:</p>
  
  <pre><code>def Get_Faults_List(Port_Number=None, PSU=None, Retries=5):
      for attempt in range(Retries):
          try:
              if Port_Number:
                  # Show the Faults view in the context of "Port_Number"
                  Device_Panel_Frame.Click_Port(self, Port_Number)
              elif PSU:
                  if not Device_Panel_Frame.Click_PSU(self, PSU):
                      return None
              Left_Panel_Frame.Click_Fault(self)
  
              self.driver.switch_to_default_content()
              Main_Body = self.driver.find_element_by_name('main_page')
              self.driver.switch_to.frame(Main_Body)
              alarms_tab = self.driver.find_element_by_id('tab_alarms')
              alarms_tab.click()
              Fault_Screen = self.driver.find_element_by_name('faults')
              self.driver.switch_to.frame(Fault_Screen)
              # the rows that the following variable collect are automatically
              # the relevant fault lines. The XPATH that was used omits the two
              # irrelevant lines
              faultTable_rows = WebDriverWait(self.driver, timeout=3, poll_frequency=0.5).until(
                  EC.presence_of_all_elements_located((By.XPATH, "//table[@id='faultTab']//tr[not(@id or @style)]")))
  
              current_faults = []
              row_index = 0
              for row in faultTable_rows:  # Go through each of the rows
                  current_faults.append([])
                  # Collect all the column elements of a certain row into a list
                  faultTable_row_cols = row.find_elements_by_tag_name("td")
                  for col in faultTable_row_cols:
                      # Each row of the Faults table is separated into 5 columns each column holds a string
                      current_faults[row_index].append(col.text)
                  row_index += 1
  
              break
          except:
              print(attempt + 1, 'attempt failed', Retries - (attempt + 1), 'to go')
              self.Refresh_Screen()
              sleep(5)
              continue
  </code></pre>
  
  <p>I will succeed to collect the table's contents also if I will open a new browser. By the way, the failure always occurs at the first line (after the header) of the following table. The line is <code>current_faults[row_index].append(col.text)</code> and I don't see why. The exception doesn't make any sense.</p>
  
  <p>Is there another way to efficiently crawl the table's contents ?</p>
  
  <p>The table:
  <a href="https://i.stack.imgur.com/6Tdlj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Tdlj.png" alt="enter image description here"></a></p>