Esempio n. 1
0
    def test_013(self):

        Selenium.save_variable_scenary(self, "Already", "Ya Tengo")

        Selenium.new_window(self, "https://www.spotify.com/py/signup/")

        Selenium.switch_to_windows_name(self, "Spoty Signup")

        Selenium.esperar_elemento(self, "Already")

        Selenium.compare_with_variable_scenary(self, "Already", "Ya Tengo")

        Selenium.esperar(self, 10)

        #RECUPERAR DESDE EXCEL
        NOMBRE = Selenium.leer_celda(self, "A1")
        APELLIDO = Selenium.leer_celda(self, "B1")
        DNI = Selenium.leer_celda(self, "C1")

        Selenium.create_variable_scenary(self, "NOMBRE", NOMBRE)
        Selenium.create_variable_scenary(self, "APELLIDO",
                                         Selenium.leer_celda(self, "B1"))
    def test_012(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.save_variable_scenary(self, "verifica_cuenta", "Variable_verifica")

        Selenium.new_window(self, "https://www.spotify.com/mx/signup/")

        Selenium.switch_to_windows_name(self, "Spotify_registro")

        Selenium.compare_with_variable_scenary(self, "verifica_cuenta", "Variable_verifica")

        Selenium.esperar(self, 3)

        # RECUPERAR DESDE EXCEL
        NOMBRE = Selenium.leer_celda(self, "A1")
        APELLIDO = Selenium.leer_celda(self, "B1")
        DNI = Selenium.leer_celda(self, "C1")

        Selenium.create_variable_scenary(self, "NOMBRE", NOMBRE)
        Selenium.create_variable_scenary(self, "APELLIDO", APELLIDO)
 def test_014(self):
     with allure.step(u'Paso 2: pasarse a la ventana de google'):
         Selenium.save_variable_scenary(self, "lbl_titulo", "Titulo")#obtengo el valor del elemento lbl_titulo y lo guardo en el directorio
     
         Selenium.new_window(self, "https://www.google.com/?hl=es")#ABRIR UNA NUEVA VENTANA 
         Selenium.get_json_file(self, "google")#TRAER EL JSON DE GOOGLE
         Selenium.switch_to_windows_name(self, "google")# ME UBICO EN LA VENTANA DE GOOGLE
        
         Selenium.esperar(5)
         
     with allure.step(u'Paso 3: Recuperar datos del excel'):
         #RECUPERAR DATOS DESD EXCEL.
     
         NOMBRE = Selenium.leer_celda(self, "A1")
         Selenium.create_variable_scenary(self, "nombre", NOMBRE)
         Selenium.create_variable_scenary(self, "apellido", Selenium.leer_celda(self, "B1"))    
         Selenium.create_variable_scenary(self, "cedula", Selenium.leer_celda(self, "C1"))   
     
         texto = Selenium.get_variable_scenary(self, "nombre")
     
         Selenium.send_key_text(self, "txt_buscar", texto)   
     
         Selenium.esperar(5)