def verificar_elemento_html_hasta_no_existir_en_el_dom_html( web_driver: WebDriver, time=5, id=None, xpath=None, link_text=None, partial_link_text=None, name=None, tag_name=None, class_name=None, css_selector=None): msg_selector_html_a_localizar = HtmlActions.generar_identificador_excepcion( id, xpath, link_text, partial_link_text, name, tag_name, class_name, css_selector) tiempo_inicial = Temporizador.obtener_tiempo_timer() while True: try: if id is not None: web_driver.find_element_by_id(id) elif xpath is not None: web_driver.find_element_by_xpath(xpath) elif link_text is not None: web_driver.find_element_by_link_text(link_text) elif partial_link_text is not None: web_driver.find_element_by_partial_link_text( partial_link_text) elif name is not None: web_driver.find_element_by_name(name) elif tag_name is not None: web_driver.find_element_by_tag_name(tag_name) elif class_name is not None: web_driver.find_element_by_class_name(class_name) elif css_selector is not None: web_driver.find_element_by_css_selector(css_selector) segundos_transcurridos = Temporizador.obtener_tiempo_timer( ) - tiempo_inicial if segundos_transcurridos > time: e = TimeoutException() e.msg = webdriver_actions_constantes.WEBDRIVER_WAIT_UNTIL_NOT_TIMEOUT_EXCEPTION.format( time, msg_selector_html_a_localizar, e.msg) raise e else: pass except NoSuchElementException: break