def dt_filter(reporter, search_string=' ', forceClear=True, quiet=True):
 if forceClear:
  if (not dt_filter(reporter, forceClear=False, quiet=quiet)):
   return False
 config = current.test_config
 browser = config.browser
 sleep_limit = 10
 elem = browser.find_element_by_css_selector('label > input[type="text"]')
 elem.clear()
 elem.send_keys(search_string)
 time.sleep(1)
 waiting_elem = browser.find_element_by_id('datatable_processing')
 sleep_time = 0
 while (waiting_elem.value_of_css_property('visibility') == 'visible'):
  time.sleep(1)
  sleep_time += 1
  if (sleep_time > sleep_limit):
   if (not quiet):
    reporter(("DataTable filter didn't respond within %d seconds" % sleep_limit))
   return False
 return True

def dt_filter ( reporter , search_string = ' ' , forceClear = True , quiet = True ) : if forceClear : if ( not dt_filter ( reporter , forceClear = False , quiet = quiet ) ) : return False config = current . test_config browser = config . browser sleep_limit = 10 elem = browser . find_element_by_css_selector ( 'label > input[type="text"]' ) elem . clear ( ) elem . send_keys ( search_string ) time . sleep ( 1 ) waiting_elem = browser . find_element_by_id ( 'datatable_processing' ) sleep_time = 0 while ( waiting_elem . value_of_css_property ( 'visibility' ) == 'visible' ) : time . sleep ( 1 ) sleep_time += 1 if ( sleep_time > sleep_limit ) : if ( not quiet ) : reporter ( ( "DataTable filter didn't respond within %d seconds" % sleep_limit ) ) return False return True
filter the datatable .