Esempio n. 1
0
    def test_013(self):

        fecha = Selenium.textDateEnvironmentReplace(self, "today")

        Selenium.get_elements(self, "txt_buscar").send_keys(fecha)

        Selenium.esperar(5)
Esempio n. 2
0
    def test_015(self):
        with allure.step(u'PASO 2: Ingresar termino de Busqueda'):
            date = Selenium.textDateEnvironmentReplace(self, "Last Month")

            Selenium.get_elements(self, "txt_busqueda").send_keys(date)

            Selenium.esperar(self, 10)
Esempio n. 3
0
 def step_impl(self, keyword):
     Selenium.Xpath_Elements(self, Inicio.txt_busqueda_xpath).click()
     Selenium.Xpath_Elements(self,
                             Inicio.txt_busqueda_xpath).send_keys(keyword)
     Selenium.Xpath_Elements(self, Inicio.txt_busqueda_xpath).send_keys(
         Keys.ENTER)
     Selenium.Esperar_Xpath(self, Inicio.txt_resultStats_xpath)
Esempio n. 4
0
 def setUp(self):
     Selenium.abrir_navegador(
         self,
         URL=
         "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert"
     )
     Selenium.get_json_file(self, "frames")
Esempio n. 5
0
    def test_020(self):
        Selenium.get_elements(self, "Email").send_keys("*****@*****.**")
        Selenium.get_elements(self, "Email Confirmacion").click()

        #Mensaje_Email = Selenium.validar_elemento(self, "Mensaje Email")
        Captcha = Selenium.validar_elemento(self, "Contenedor Captcha")

        #print(Mensaje_Email)

        if Captcha:
            pytest.skip("No se ejecuto la prueba, captcha esta visible")
Esempio n. 6
0
 def step_impl(self, QResult):
     Selenium.Captura(self, u'Then Query results are under 1000',
                      self.driver)
     Resultados = Selenium.Xpath_Elements(self,
                                          Inicio.txt_resultStats_xpath).text
     print(Resultados)
     RAET = Resultados.split(" ")[2]
     print("RAET obtuvo: " + str(RAET) + " Resultados de busqueda")
     Resultado = RAET.replace(",", "")
     unittest.TestCase.assertTrue(
         int(Resultado) > int(QResult), "Es mayor a 10000")
Esempio n. 7
0
 def test_001(self):
     assert Selenium.xpath_element(self, Registro.lbl_titulo_xpath).text == "Regístrate gratis para escuchar"
     print (Selenium.xpath_element(self, Registro.lbl_titulo_xpath).text)
     
     Selenium.xpath_element(self, Registro.txt_correo_xpath).send_keys("*****@*****.**")
     Selenium.xpath_element(self, Registro.txt_confirmarcorreo_xpath).send_keys("*****@*****.**")
     
     Selenium._id_element(self, Registro.txt_contrasena_id).send_keys("*****@*****.**")
     Selenium.xpath_element(self, Registro.btn_registrate_xpath).click()
     
     time.sleep(5)
    def test_008(self):
        Selenium.get_json_file(self, "Spotify")

        Selenium.send_key_text(self, "txt_correo", "*****@*****.**")
        Selenium.send_especific_keys(self, "txt_correo", "Tab")

        Selenium.assert_text(
            self, "lbl_errorcorreo",
            "Este correo electrónico ya está conectado a una cuenta. Inicia sesión."
        )

        Selenium.esperar(5)
Esempio n. 9
0
    def test_011(self):

        Selenium.get_elements(self,
                              "Email").send_keys("*****@*****.**")
        Selenium.send_especific_keys(self, "Email", "Tab")

        verificar = Selenium.validar_elemento(self, "Email Error")

        if verificar == True:
            #Selenium.send_key_text(self, "Email", "*****@*****.**")
            #pytest.skip("El email ya existe")
            unittest.TestCase.skipTest(self, "El email ya existe")

        time.sleep(5)
Esempio n. 10
0
    def test_005(self):
        Selenium.get_json_file(self, "Amazon")

        Selenium.scroll_to(self, "lnk_trabaja_amazon")

        Selenium.esperar(5)

        Selenium.js_clic(self, "lnk_trabaja_amazon")
Esempio n. 11
0
    def test_013(self):
        with allure.step(u'Paso 2: Ingresar a Google'):
            date = Selenium.textDataEnvironmentReplace(self, "last month")
            Selenium.get_elements(self, "txt_busqueda").send_keys(date)
            Selenium.send_especific_keys(self, "txt_busqueda", "Enter")

            Selenium.esperar(3)
Esempio n. 12
0
 def test_016(self):
     with allure.step(u'Paso 2: Ingresar un correo duplicado'):
         Selenium.send_key_text(self, "txt_correo", "*****@*****.**")
         Selenium.get_elements(self, "txt_confirmarcorre").click()
         Mensaje_Email_Obj = Selenium.validar_elemento(self, "lbl_errorcorreo")
         Mensaje_Email_texto = Selenium.get_text(self, "lbl_errorcorreo")
         
     #with allure.step(u'Paso 3: verificar mensaje de correo repetido'):
      #   assert Mensaje_Email_Obj == True, "No se visualizo el mensaje de error email duplicado"
         
         Selenium.esperar(5)
Esempio n. 13
0
    def test_005(self):

        Selenium.new_window(self, "https://www.mercadolibre.com.mx/ofertas#nav-header")
        time.sleep(3)

        Selenium.switch_to_windows_name(self, "Ofertas")
        time.sleep(3)

        Selenium.switch_to_windows_name(self, "Principal")
        time.sleep(3)

        Selenium.switch_to_windows_name(self, "Ofertas")
        time.sleep(3)
Esempio n. 14
0
    def test_004(self):
        #cargar el JSON con los valores de los ID de la APP
        Selenium.get_json_file(self, "iframe")

        Selenium.new_window(
            self,
            "https://www.mercadolibre.com.co/gz/home/navigation#nav-header")

        Selenium.switch_to_windows_name(self, "Historial")

        Selenium.switch_to_windows_name(self, "Principal")

        time.sleep(10)
Esempio n. 15
0
    def test_010(self):

        Selenium.get_elements(self, "Email").send_keys("mervlugo@gmailcom")
        Selenium.send_especific_keys(self, "Email", "Tab")

        Selenium.assert_text(self, "Email Error", "La dirección de email que proporcionaste no es válida.")

        time.sleep(5)
Esempio n. 16
0
 def setUp(self):
     with allure.step(u'Paso 1: Ingresar a Google'):
         Selenium.pyodbc_query(self,
                               "SELECT * FROM BD_SDFT_INS_WEB.PORTAFOLIO")
         print("Se obtienen los portafolios.")
         Selenium.abrir_navegador(self, "https://www.google.com/")
         # CARGAR EL JSON CON LOS VALORES DE LOS ID DE LA APP
         Selenium.get_json_file(self, "Google")
Esempio n. 17
0
    def test_010(self):

        assert "No coinciden", Selenium.get_text(
            self, "Titulo") == Registro.tituloPagina
        # assert "No coinciden", Selenium.get_elements(self, "Titulo").text == Registro.tituloPagina

        # Selenium.get_text(self, "Titulo") == Registro.tituloPagina
        Selenium.get_elements(self, "Email").send_keys("dfsd")
        Selenium.send_especific_keys(self, "Email", "Tab")

        verificar = Selenium.check_element(self, "mensaje_error_email")

        if verificar == True:
            Selenium.send_key_text(self, "Email", Registro.emailUsuario)
            unittest.TestCase.skipTest(self, "El email ya existe")

        time.sleep(5)
Esempio n. 18
0
    def test_021(self):
        Selenium.get_elements(self,
                              "Email").send_keys("*****@*****.**")
        Selenium.get_elements(self, "Email Confirmacion").click()

        Mensaje_Email_Obj = Selenium.validar_elemento(self, "Mensaje Email")
        Captcha = Selenium.validar_elemento(self, "Contenedor Captcha")

        Mensaje_Email_texto = Selenium.get_text(self, "Mensaje Email")

        assert Mensaje_Email_Obj == True, "No se visualizo el mensaje de error email duplicado"
        assert Captcha == True, "No se visualizo el captcha"

        assert Mensaje_Email_texto == "Lo sentimos, este correo ya está registrado.", f"El mensaje esperado es: 'Lo sentimos, este correo ya está registrado.',  el mensaje obtenido fue: {Mensaje_Email_texto}"
Esempio n. 19
0
    def step_impl(self, KEYWORDS):
        Validar = Selenium.Esperar_Xpath(self, Inicio.txt_busqueda_xpath)
        if Validar == False:
            Selenium.CapturarPantalla(self, u"No se inicializo google.com")
            pytest.skip("No se inicializo google.com")
            self.driver.quit()

        Selenium.Xpath_Elements(self, Inicio.txt_busqueda_xpath).click()
        Selenium.Xpath_Elements(self,
                                Inicio.txt_busqueda_xpath).send_keys(KEYWORDS)
        Selenium.Xpath_Elements(self, Inicio.txt_busqueda_xpath).send_keys(
            Keys.ENTER)
        Selenium.Esperar_Xpath(self, Inicio.txt_resultStats_xpath)
Esempio n. 20
0
    def test_016(self):

        assert "No coinciden", Selenium.get_text(
            self, "Titulo") == Registro.tituloPagina
        # assert "No coinciden", Selenium.get_elements(self, "Titulo").text == Registro.tituloPagina

        Selenium.get_elements(self, "Email").send_keys(Registro.emailUsuario)
        Selenium.get_elements(self, "emailConfirm").click()

        captcha = Selenium.validar_elemento(self, "Captcha")

        if captcha:
            pytest.skip("No se ejecutó la prueba. La captcha está visible.")
Esempio n. 21
0
    def test_007(self):

        print(u"Seleccionar Pais")

        self.esperar_xpath(Login_Meli.lbl_titulo_pais_xpath)
        self.xpath_elements_tap(Login_Meli.chk_Argentina_xpath)
        self.captura("Esto es Captura para Allure")

        print(u"Ingresar Usuario")
        self.esperar_id(Login_Meli.lbl_titulo_id)
        self.captura("Esto es Captura para Allure")

        print(u"Seleccionar tipo de Autenticación")
        self.esperar_id(Login_Meli.btn_already_id)
        self.id_elements_tap(Login_Meli.btn_already_id)

        print(u"Ingresar Usuario")
        self.esperar_id(Login_Meli.lbl_titulo_login_id)
        self.sendkeys_id(Login_Meli.txt_usuario_id, "*****@*****.**")
        self.captura("Estos es una bonitas capturas")
        self.id_elements_click(Login_Meli.btn_continuar_id)

        print(u"Ingreso de clave")
        self.esperar_id(Login_Meli.btn_ingresar_id)
        self.sendkeys_id(Login_Meli.txt_clave_id, "edgarmejias26")
        self.captura("Estos es una bonitas capturas para clientes")
        self.id_elements_click(Login_Meli.btn_ingresar_id)

        print(u"Validar el usuario logueado")
        self.waitStopLoad(3)
        self.captura("Estos es una bonitas capturas")
        self.id_elements_tap(Menu_Meli.btn_menu_accid)
        self.waitStopLoad(3)
        self.assertTrue(
            True, Selenium.esperar_id(self, Menu_Meli.lbl_UsuarioLogueado_id))
        self.assertEqual(
            "¡Hola edgar!",
            self.get_to_text_element_id(Menu_Meli.lbl_UsuarioLogueado_id))
        self.captura("Estos es una bonitas capturas")
        self.driver.close_app()

        print('DONE!!')
Esempio n. 22
0
class set_Values():
    
    Functions().Modificar_XML_Enviroments()
Esempio n. 23
0
 def tearDown(self):
     with allure.step(u'PASO 3: Salir de la app'):
         Selenium.tearDown(self)
Esempio n. 24
0
 def test_016(self):
     with allure.step(u'PASO 2: Captura de pantalla'):
         Selenium.captura(self, "Google")
         Selenium.esperar(self, 10)
Esempio n. 25
0
 def setUp(self):
     with allure.step(u'PASO 1: Ingresar a Google'):
         Selenium.abrir_navegador(self, "https://www.google.com/")
         Selenium.get_json_file(self, "Google")
Esempio n. 26
0
 def setUp(self):
     Selenium.abrir_navegador(self)
Esempio n. 27
0
 def tearDown(self):
     Selenium.tearDown(self)
Esempio n. 28
0
 def setUp(self):
     Selenium.abrir_navegador(self)
     Selenium.get_json_file(self, "Spotify_registro")
Esempio n. 29
0
 def tearDown(self):
     with allure.step(u'Paso 4: Cerrar el navegador'):
         Selenium.tearDown(self)
Esempio n. 30
0
 def setUp(self):
     with allure.step(u'Paso 1: Ingresar a la pagina de spotify'):
         Selenium.abrir_navegador(self, "https://www.spotify.com/co/signup/")
         Selenium.get_json_file(self, "Spotify")