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)
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)
def test_007(self): Selenium.get_json_file(self, "alphasig") Selenium.send_key_text(self, "txt_USUARIO", "alpha") Selenium.send_especific_keys(self,"txt_USUARIO", "Tab") Selenium.send_key_text(self, "txt_CLAVE", "homero") Selenium.send_especific_keys(self,"txt_CLAVE", "Enter") Selenium.esperar(5)
def test_006(self): Selenium.get_json_file(self, "helpdesk") Selenium.send_key_text(self, "txt_agente", "alpha") Selenium.send_key_text(self, "txt_contrasena", "alaaa") Selenium.get_elements(self, "btn_aceptar").click() Selenium.esperar(4) Selenium.alert_windows(self, "accept") Selenium.esperar(5)
def test_004(self): #cARGAR EL JSON CON LOS VALORES DE LOS ID DE LA APP Selenium.get_json_file(self, "frames") Selenium.switch_to_iframe(self, "Frame2") Selenium.select_by_text(self, "Frame2 Select", "Avatar") Selenium.switch_to_parentFrame(self) Selenium.switch_to_iframe(self, "Frame1") Selenium.send_key_text(self, "Frame1 input", "Hola Chicos de Udemy") Selenium.switch_to_iframe(self, "Frame3") Selenium.get_elements(self, "Frame3 input").click() time.sleep(5)
def test_009(self): Selenium.get_json_file(self, "Spotify") Selenium.get_elements( self, "txt_correo").send_keys("*****@*****.**") Selenium.send_especific_keys(self, "txt_correo", "Tab") verificar = Selenium.check_element(self, "lbl_errorcorreo") if verificar == True: #Selenium.get_elements(self, "txt_correo").clear() Selenium.send_key_text(self, "txt_correo", "*****@*****.**") Selenium.send_especific_keys(self, "txt_correo", "Tab") #unittest.TestCase.skipTest(self, "El email ya existe") Selenium.esperar(5)
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)
def test_010(self): Selenium.get_json_file(self, "Spotify") 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 texto = Selenium.get_variable_scenary(self, "Titulo") Selenium.send_key_text(self, "txt_buscar", texto) Selenium.esperar(5)
def test_003(self): #cargar el JSON con los valores de los ID de la APP Selenium.get_json_file(self, "iframe") Selenium.switch_to_iframe(self, "fra_frame2") Selenium.select_by_text(self, "dpd_animales", "Avatar") Selenium.switch_to_parentFrame(self) Selenium.switch_to_iframe(self, "fra_frame1") Selenium.send_key_text(self, "txt_topic", "Hola soy Luisa") Selenium.switch_to_iframe(self, "fra_frame3") Selenium.get_elements(self, "chk_options").click() time.sleep(10)
def test_004(self): # CARGAR EL JSON CON LOS VALORES DE LOS ID DE LA APP Selenium.get_json_file(self, "frames") # -------------------- IR A FRAME 2 -------------------- Selenium.switch_to_iframe(self, "Frame2") Selenium.select_by_text(self, "Frame2 Select", "Avatar") time.sleep(5) # -------------------- VOLVER AL FRAME PRINCIPAL -------------------- Selenium.switch_to_parentFrame(self) # -------------------- IR A FRAME 1 -------------------- Selenium.switch_to_iframe(self, "Frame1") Selenium.send_key_text(self, "Frame1 Input", "Hola Chicos Udemy") time.sleep(5) # -------------------- IR A FRAME 3 -------------------- Selenium.switch_to_iframe(self, "Frame3") Selenium.get_elements(self, "Frame3 Input").click()
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)
def test_008(self): Selenium.page_has_loaded(self) Selenium.get_elements(self, "txt_busqueda").click() Selenium.send_key_text(self, "txt_busqueda", "w3schools") Selenium.send_especific_keys(self, "txt_busqueda", "Enter") Selenium.esperar(5)