def test_001_FillForm(self, getData): hp = HomePage(self.driver) hp.set_Name(getData["Name"]) hp.set_Email(getData["Email"]) hp.set_Password(getData["Password"]) hp.click_Checkbox() self.selectOptionbyText(hp.set_gender(), getData["Gender"]) hp.click_Submit() # Get alert msg and verify Msg = hp.get_Alert_Msg().text assert "Success!" in Msg # Click on Shop hp.click_Shop()
def test_002_Products(self): hp = HomePage(self.driver) hp.click_Shop() Cart = ProductsPage(self.driver) Cart.Product_Title() i = -1 for item in Cart.Product_Title(): i = i + 1 item_Name = item.text # print(item_Name) if item_Name == "Nokia Edge": Cart.Product_Add()[i].click() Cart.Click_CheckOut()