def navegar_a_portal_principal_owa(web_driver: WebDriver, url: str,
                                       result_list: ValidacionResultList):

        resultado = ResultStep()
        resultado.tiempo_inicio_de_ejecucion = 0
        resultado.inicializar_tiempo_de_ejecucion()
        segundos_por_esperar_elemento_html = 10

        try:
            web_driver.get(url)
            ValidacionesHTML.verificar_ingreso_exitoso_pagina_principal(
                web_driver, constantes_webdriver_actions.
                INICIAR_SESION_EN_OWA_ID_INPUT_PASSWORD,
                segundos_por_esperar_elemento_html)

            resultado.mensaje_error = constantes_webdriver_actions.NAVEGAR_SITIO_MSG_INGRESO_SITIO_CON_EXITO. \
                format(url)

            resultado.validacion_correcta = True

        except sel_excep.TimeoutException as e:
            resultado.mensaje_error = constantes_webdriver_actions.NAVEGAR_SITIO_MSG_TIMEOUT_EXCEP_MSG_ERROR.format(
                segundos_por_esperar_elemento_html, url,
                FormatUtils.formatear_excepcion(e))

            resultado.validacion_correcta = False

        except sel_excep.WebDriverException as e:
            resultado.mensaje_error = constantes_webdriver_actions.NAVEGAR_SITIO_MSG_WEBDRIVER_EXCEP_MSG_ERROR. \
                format(FormatUtils.formatear_excepcion(e))

            resultado.validacion_correcta = False

        resultado.finalizar_tiempo_de_ejecucion()
        resultado.establecer_tiempo_de_ejecucion()
        result_list.result_validacion_ingreso_url = resultado

        return result_list
    def cerrar_sesion(webdriver: WebDriver, result_list: ValidacionResultList,
                      correo: Correo):

        resultado_cierre_sesion = ResultStep()
        resultado_cierre_sesion.inicializar_tiempo_de_ejecucion()
        cierre_sesion_exitosa = False

        # verifica si se tiene error de credenciales, por lo cual si se tiene este error, se establece el mensaje
        # de error y envia el result como finalizado, esto debido a que no puede localizar el boton de cierre de
        # sesion sin antes haberse loggeado dentro de la plataforma
        if result_list.result_validacion_acceso_portal_owa.error_inicio_de_sesion_credenciales_erroneas:
            resultado_cierre_sesion.finalizar_tiempo_de_ejecucion()
            resultado_cierre_sesion.establecer_tiempo_de_ejecucion()
            resultado_cierre_sesion.validacion_correcta = False

            resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions. \
                CERRAR_SESION_MSG_ERROR_CREDENCIALES_OWA.format(result_list.result_validacion_acceso_portal_owa.
                                                                msg_error_de_credenciales)

            result_list.result_validacion_cierre_sesion = resultado_cierre_sesion

            return result_list

        # verifica si hay error en plataforma, en caso de ser asi, intenta realizar n intentos para volver a loggearse
        # y verificar si ingreso correctamente al buzon de entrada para navegar entre las carpetas
        if ValidacionesHTML.verificar_error_plataforma(webdriver):
            resultado_cierre_sesion = ValidacionesHTML.intento_ingreso_nuevamente_al_portal(
                resultado_cierre_sesion,
                correo,
                webdriver,
                step_evaluacion='cierre de sesion')

        try:
            if constantes_utils.owa_descubierto == 2013 or constantes_utils.owa_descubierto == 2016:
                btn_perfil_usuario = BusquedaElementosHtml.localizar_boton_perfil_usuario(
                    webdriver)
                btn_perfil_usuario.click()

                btn_cierre_de_sesion = BusquedaElementosHtml.localizar_boton_cierre_sesion_owa_2013_2016(
                    webdriver)
                btn_cierre_de_sesion.click()

            elif constantes_utils.owa_descubierto == 2010:
                enlace_cierre_sesion = BusquedaElementosHtml.localizar_enlace_cierre_sesion_owa_2010(
                    webdriver)
                enlace_cierre_sesion.click()

            webdriver.get(correo.url)

            ValidacionesHTML.verificar_ingreso_exitoso_pagina_principal(
                webdriver, constantes_webdriver_actions.
                INICIAR_SESION_EN_OWA_ID_INPUT_PASSWORD, 10)

            cierre_sesion_exitosa = True

        except sel_excep.NoSuchElementException as e:
            resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions. \
                CERRAR_SESION_LOG_ERROR_NO_SUCH_ELEM_EXCEP.format(FormatUtils.formatear_excepcion(e))

            resultado_cierre_sesion.validacion_correcta = False

        except sel_excep.ElementClickInterceptedException:
            webdriver.refresh()
            EvaluacionesHtml.cerrar_sesion(webdriver, result_list, correo)

        except sel_excep.TimeoutException as e:
            resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions. \
                CERRAR_SESION_LOG_ERROR_TIMEOUT_EXCEP.format(FormatUtils.formatear_excepcion(e))

            resultado_cierre_sesion.validacion_correcta = False

        except sel_excep.WebDriverException as e:
            resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions. \
                CERRAR_SESION_LOG_ERROR_WEBDRIVER_EXCEP.format(FormatUtils.formatear_excepcion(e))

            resultado_cierre_sesion.validacion_correcta = False

        except AttributeError:
            resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions. \
                CERRAR_SESION_LOG_ERROR_ATRIBUTE_ERROR_EXCEP

            resultado_cierre_sesion.validacion_correcta = False

        finally:

            # verifica que no haya algun mensaje de error en la plataforma, en caso contrario se muestra el mensaje de
            # error que aparace en la plataforma dentro del result
            if ValidacionesHTML.verificar_error_plataforma(webdriver):
                resultado_cierre_sesion.validacion_correcta = False
                msg_error = ValidacionesHTML.obtener_mensaje_error_plataforma(
                    webdriver)

                resultado_cierre_sesion.mensaje_error = constantes_webdriver_actions.CERRAR_SESION_ERROR_PLATAFORMA. \
                    format(msg_error)

                cierre_sesion_exitosa = False

        if cierre_sesion_exitosa:
            resultado_cierre_sesion.mensaje_error = constantes_json.OUTPUT_EXITOSO_3_1
            resultado_cierre_sesion.validacion_correcta = True

        resultado_cierre_sesion.finalizar_tiempo_de_ejecucion()
        resultado_cierre_sesion.establecer_tiempo_de_ejecucion()
        result_list.result_validacion_cierre_sesion = resultado_cierre_sesion

        return result_list