def dt_data(row_list=None, add_header=False):
 config = current.test_config
 browser = config.browser
 cell = browser.find_element_by_id('table-container')
 text = cell.text
 parts = text.splitlines()
 records = []
 cnt = 0
 lastrow = ''
 header = ''
 for row in parts:
  if row.startswith('Detail'):
   header = lastrow
   row = row[8:]
   if ((row_list == None) or (cnt in row_list)):
    records.append(row)
   cnt += 1
  else:
   lastrow = row
 if add_header:
  return ([header] + records)
 return records

def dt_data ( row_list = None , add_header = False ) : config = current . test_config browser = config . browser cell = browser . find_element_by_id ( 'table-container' ) text = cell . text parts = text . splitlines ( ) records = [ ] cnt = 0 lastrow = '' header = '' for row in parts : if row . startswith ( 'Detail' ) : header = lastrow row = row [ 8 : ] if ( ( row_list == None ) or ( cnt in row_list ) ) : records . append ( row ) cnt += 1 else : lastrow = row if add_header : return ( [ header ] + records ) return records
return the data in the displayed datatable .