def _assert_no_element_by(context, by, value, wait_time=MAX_WAIT_FOR_UNEXPECTED_ELEMENT):
 try:
  WebDriverWait(context.browser, wait_time).until(EC.presence_of_element_located((by, value)))
 except TimeoutException:
  return True
 raise KALiteTimeout

def _assert_no_element_by ( context , by , value , wait_time = MAX_WAIT_FOR_UNEXPECTED_ELEMENT ) : try : WebDriverWait ( context . browser , wait_time ) . until ( EC . presence_of_element_located ( ( by , value ) ) ) except TimeoutException : return True raise KALiteTimeout
raises a timeoutexception if the element is *still* found after wait_time seconds .