def test_02(self): with allure.step(u'PASO 2: Extraer desde Trivago'): Listado = self.driver.find_elements( By.XPATH, "//span[contains(@class, '_2e_OvRJN')]") n = 2 for item in Listado: posicion = "A" + str(n) Selenium.escribir_celda(self, posicion, item.text, 'test2') n += 1
def setUp(self): #ABRIR LA APP with allure.step(u'PASO 1: Data desde Excel'): self.driver = Selenium.open_browser( self, URL= 'https://www.tripadvisor.com.ar/Attractions-g34439-Activities-Miami_Beach_Florida.html' ) self.email = Selenium.leer_celda(self, 'C2') self.text = Selenium.leer_celda(self, 'A1', 'test2')
def test_something2(self): Selenium.openJson(self, "spotify") Selenium.get_elements(self, "email").clear() Selenium.get_elements(self, "email").send_keys("*****@*****.**") Selenium.get_elements(self, "email").send_keys(Keys.TAB) isPresent = Selenium.isPresent(self, "email error") assert isPresent == False, "isPresent: el objeto no esta presente"
def setUp(self): Selenium.open_browser(self)
def tearDown(self): Selenium.tearDown(self)
def test_something3(self): Selenium.screenshot(self) time.sleep(1) Selenium.screenshot(self)
def test_something(self): Selenium.openJson(self, "spotify") Selenium.get_elements(self, "email").clear() Selenium.get_elements(self, "email").send_keys("*****@*****.**") Selenium.get_elements(self, "email").send_keys(Keys.TAB) #time.sleep(3) Selenium.waitElement(self, "email error") mensaje = Selenium.get_elements(self, "email error").text assert "Este correo electrónico ya está conectado a una cuenta" in mensaje, f"El mensaje no coincide : {mensaje}"
def tearDown(self): with allure.step(u'PASO 3: Salir de la aplicación.'): Selenium.tearDown(self)
def test_02(self): #ESPERAR EL INICIO DE LA APP with allure.step(u'PASO 2: Ingresar un correo ya utilizado'): Selenium.openJson(self, "spotify") Selenium.get_elements(self, "email").clear() Selenium.get_elements( self, "email").send_keys("*****@*****.**") Selenium.get_elements(self, "email").send_keys(Keys.TAB) Selenium.waitElement(self, "email error") mensaje = Selenium.get_elements(self, "email error").text assert "Este correo electrónico ya está conectado a una cuenta" in mensaje, f"El mensaje no coincide : {mensaje}" Selenium.allureScreenshot(self, "Whats uuuuuuupppppp")
def setUp(self): #ABRIR LA APP with allure.step(u'PASO 1: Ingresar a spotyfy register'): Selenium.open_browser(self)